删除 Github Jekyll 中的 'blog' 部分

Remove 'blog' section in the Github Jekyll

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

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

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