【问题标题】:Jekyll - How do you get rendered content of posts?Jekyll - 你如何获得帖子的渲染内容?
【发布时间】:2018-02-24 14:04:19
【问题描述】:

我需要在 Jekyll 中获取一些帖子的渲染内容(没有 html 标签)。当我执行“post.content”时,它会返回完整的 HTML 而不是呈现的文本。我该怎么做?

【问题讨论】:

    标签: html jekyll blogs


    【解决方案1】:

    你可以使用strip_html过滤{{ post.content | strip_html }}

    【讨论】:

    • 非常感谢!
    猜你喜欢
    • 1970-01-01
    • 2015-07-18
    • 2013-10-23
    • 1970-01-01
    • 2019-10-12
    • 2018-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多