gpt4 book ai didi

jekyll - 在 Jekyll/Kramdown 中抑制博客页脚

转载 作者:行者123 更新时间:2023-12-03 16:05:31 29 4
gpt4 key购买 nike

我在 Github 上使用 Jekyll 和 Kramdown。我的博客标题,我放在 _config.yml , 出现在页面的页眉中,但也在页脚中出现两次。我想抑制页脚中的两次出现。有没有办法做到这一点?

最佳答案

正如评论中所说,您需要编辑的代码位于/_includes/footer.html .

在那里你会发现你的博客标题打印了两次,删除一个,它应该可以工作。

include tag tag allows you to include the content from another file stored in the _includes folder"



您可以在这里阅读更多信息: https://jekyllrb.com/docs/includes/

没有包含目录意味着您正在使用 Jekyll 主题 .
  • 在 _config.yml 中查看以“theme:”开头的行,例如“theme: minima”并注意该名称。
  • 现在您需要将该主题包含目录复制到您的 Jekyll 站点目录中,以便您可以对其进行编辑。使用以下命令找到该主题:bundle show <theme name>例如:
     bundle show minima

    它将返回如下内容:/var/lib/gems/minima
  • 复制 _includes目录到你的 Jekyll 目录。
     cp -r /var/lib/gems/minima/_includes .
  • 开通 ./_includes/footer.html并找到重复的标题。
  • 关于jekyll - 在 Jekyll/Kramdown 中抑制博客页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43670690/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com