【问题标题】:Jekyll website cannot convert markdown and liquid to html properly with "github-pages" Jekyll pluginsJekyll 网站无法使用“github-pages”Jekyll 插件正确地将 Markdown 和 Liquid 转换为 html
【发布时间】:2020-06-22 23:09:27
【问题描述】:

我在本地创建了一个 Jekyll 网站。它适用于“bundle exec jekyll serve”。

但是经过以下操作后,我的网站却无法正常将markdown和liquid code转html。

这就是我在项目中安装“github-pages”的方式。

  1. 在 Gemfile 中添加 "gem "github-pages", group: :jekyll_plugins",
  2. “sudo bundle install && sudo bundle update”

在添加 github-pages 插件之前

添加 github-pages 插件并运行“bundle exec jekyll serve”后

它无法正确转换降价块。谁能帮帮我,我真的很感激。 这是我的 jekyll 网站code repos

【问题讨论】:

    标签: html markdown jekyll github-pages liquid


    【解决方案1】:

    我已经解决了这个问题。在本地 Jekyll 网站中,{{ page.content }} 被识别为“markdown +liquid”代码sn-p。

    不知何故,Github-pages 无法识别 {{ page.content }} 中的 markdown 部分,我们需要使用过滤器明确告诉 Gitpages {{ page.content }} 中有 markdown 代码 sn-ps。

    {{ page.content | markdownify | liquify }}
    

    【讨论】:

      猜你喜欢
      • 2021-02-09
      • 1970-01-01
      • 2013-08-17
      • 1970-01-01
      • 1970-01-01
      • 2013-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多