Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Expose post content rendering helper in PostExtension

未关闭
#175 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
elixir
领域
web-dev

调研方向

从 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Elixir Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。