【问题标题】:wrong path for the categories in OctopressOctopress 中类别的错误路径
【发布时间】:2014-02-10 17:35:02
【问题描述】:

我正在尝试升级 Octopress 的问题。 通过使用 SEO 工具分析我的博客,我注意到缺少“/”(在博客和类别之间):

http://www.myblog.com/blogcategories/linux

我还注意到,在 octopress/public/categories 文件夹中,对于我博客的每个类别,都会使用一个 index.html 文件创建一个文件夹,即:

octopress/public/categories/linux/index.html

在第 22 行,我看到了:

<link rel="canonical" href="http://myblog.com/blogcategories/linux">

这是我的问题的根源。
我想知道 Octopress 中的哪个模块生成了这个文件,我的错误可能是什么?
我在 _config.yml 中声明了以下参数:

category_dir: categories

【问题讨论】:

    标签: octopress


    【解决方案1】:

    我不确定这是否能完全解决您的问题,但我发现这个网站有很多 octopress hack。侧边栏有一个关于类别的部分:http://www.narga.net/improve-octopress-advanced-tweaks-tips/

    侧边栏类别列表 该插件提供侧边栏中显示的类别列表和帖子计数。

    • tag_cloud.rb保存到plugins/tag_cloud.rb
    • category_list.html保存到source/_includes/custom/asides/category_list.html
    • _config.yml 中附加到default_asides
    • 添加到_config.ymldefault_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html, custom/asides/category_list.html]

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-29
      • 1970-01-01
      相关资源
      最近更新 更多