【问题标题】:Remove 'blog' section in the Github Jekyll删除 Github Jekyll 中的“博客”部分
【发布时间】:2020-09-16 17:30:16
【问题描述】:

我想知道如何在没有“博客”部分(包括帖子)的情况下使用 Github Jekyll 网站。你能分享你的解决方案吗?提前致谢。

【问题讨论】:

    标签: github post repository jekyll blogs


    【解决方案1】:

    我必须假设您有一个博客页面,blog.htmlblog/index.html,并且在该页面中有一个 for 循环调用 site.postspaginator.posts。你有两个选择:

    1. 删除_posts目录。
    2. 如果您想保留_posts 中的帖子但不希望它们显示在您的网站上,请不要使用上面提到的for 循环,您将看不到前端的帖子。

    【讨论】:

    • 感谢您的评论!我想要第二个选项。如何删除 Github 中 blog/index.html 中的 for 循环?
    • 从 index.html 文件中删除它们应该可以,不是吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-08
    • 1970-01-01
    • 1970-01-01
    • 2020-05-06
    • 1970-01-01
    • 2014-07-16
    相关资源
    最近更新 更多