Expose post content rendering helper in PostExtension
还没有人认领这个 Issue。
评估
调研方向
从 Tableau.PostExtension.post()、Tableau.Page.t() 和现有的 Tableau.markdown/2 入口点开始,追踪 post 和 page 渲染函数是如何暴露的。将 render_content 函数添加到两个相关接口中,使扩展能够一致地渲染摘要和其他元内容,然后验证 issue 中描述的 Temple 用法。
由索引模型根据 Issue 内容生成。
描述
I've got a couple of extensions, TableauExcerptExtension and an as-yet-unpublished revisions tracking extension where I've got meta-content in frontmatter that should be written in the same format as the main content.
Right now, that only works reasonably well for markdown posts because Tableau.markdown/2 exists. However, if each post has a render_content/1 function included (similar to the renderer function attribute), this could be handled for extended content types without special handling‡.
Tableau.PostExtension.post() would need to be updated to include a render_content, function, and Tableau.Page.t() would need to be updated so the same function is exposed for use just like page.template.
This would allow post rendering to do something like this (Temple example in a index page):
div do
post.render_content.(post.excerpt)
end
‡ There is special handling in an upcoming version of TableauExcerptExtension because it has to do some processing of the content, but that's something separate.
- 主要语言
- Elixir
- 星标
- 307
- 派生
- 18
- 平均合并
- 7 小时 28 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 72/100
electric-sql/electric#4830 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Gradle release-date fallback accepts `Last-Modified` from non-2xx responses, so `cooldown` lets brand-new plugin versions through可能已有人在做 @v-robaiken 于 1 天前认领。 未关闭L: java:gradle T: bug 🐞
难度 2/5 1-3 小时 新手友好度 76/100
dependabot/dependabot-core#16547 · 1 个 reaction · 已指派 2 人 ·
维护者通常 1 天内回复
-
github_actions
难度 1/5 1 小时以内 新手友好度 94/100
维护者通常 1 天内回复