通过修改menu中的配置,可以在菜单栏里添加自己需要的模块,添加完成后需要通过hexo new page "categories"来生成对应的主页,在source/目录下会生成对应目录categories。然年通过菜单栏点击进去后会进入对应的网页。这里需要注意的是需要在生成的source/categories/index.md文件中添加type: "categories",否则添加的类别将不会自动更新。tags目录也是类似的。
1 2 3 4 5 6
menu: home: / || fa fa-home #about: /about/ || fa fa-user # tags: /tags/ || fa fa-tags categories: /categories/ || fa fa-th archives: /archives/ || fa fa-archive
# 选择支持评论的方式,这里采用gitalk comments: # Available values: tabs | buttons style: tabs # Choose a comment system to be displayed by default. # Available values: changyan | disqus | disqusjs | gitalk | livere | valine active: gitalk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Gitalk # For more information: https://gitalk.github.io, https://github.com/gitalk/gitalk gitalk: enable: true github_id: linhao0204 # 个人的github用户名 id: location.pathname repo: blog-comment # 这是上面新建的仓库名 client_id: # 申请Apps时获取到的id client_secret: # 申请Apps时获取到的密码 admin_user: ["linhao0204"] # 这里需要增加管理员用户,可以初始化issue,否则会提示”未找到相关的 Issues 进行评论“ distraction_free_mode: true # Facebook-like distraction free mode # Gitalk's display language depends on user's browser or system environment # If you want everyone visiting your site to see a uniform language, you can set a force language value # Available values: en | es-ES | fr | ru | zh-CN | zh-TW language: zh-CN
{ "enable_mathjax": true, "js": [ "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js", "res://MarkdownPreview/js/math_config.js" ], "markdown_extensions": [ // Python Markdown Extra with SuperFences. // You can't include "extra" and "superfences" // as "fenced_code" can not be included with "superfences", // so we include the pieces separately. "markdown.extensions.footnotes", "markdown.extensions.attr_list", "markdown.extensions.def_list", "markdown.extensions.tables", "markdown.extensions.abbr", "pymdownx.betterem", { "markdown.extensions.codehilite": { "guess_lang": false } }, // Extra's Markdown parsing in raw HTML cannot be // included by itself, but "pymdownx" exposes it so we can. "pymdownx.extrarawhtml",