主页侧边栏导航
根据需要配置侧边栏导航,注释掉icon项可直接显示标题
xxx/_config.stellar.yml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| menubar: columns: 4 items: - id: post theme: '#1BCDFC' icon: solar:documents-bold-duotone title: 博客 url: / - id: wiki theme: '#3DC550' icon: solar:notebook-bookmark-bold-duotone title: 文档 url: /wiki/ - id: explore theme: '#FA6400' icon: solar:planet-bold-duotone title: 探索 url: /explore/ - id: social theme: '#F44336' icon: solar:chat-square-like-bold-duotone title: 社交 url: /friends/
|
主页顶部导航
根据需要配置顶部导航nav_tabs
xxx/_config.stellar.yml1 2 3 4 5 6 7 8 9
| index_blog: base_dir: blog menu_id: post leftbar: welcome, recent rightbar: nav_tabs: '分类': /categories/ '专栏': /topic/
|
- 默认导航有
近期发布和归档两个选项,其他标签按要求添加即可。
专栏/专题列表
在 blog/source/_data 文件夹中创建一个 topic文件夹,在其中放入各个专栏的描述文件,文件名就是项目的 id
blog/source/_data1 2 3 4
| name: Stellar title: Stellar - 每个人的独立博客 description: 关于搭建独立博客相关的知识和经验分享,以及 Stellar 的高级用法、版本更新相关的注意事项。 order_by: -date
|
使用专栏
在发布文章时制定专栏id
source\_posts\一篇文章.md1 2 3 4 5
| --- title: 这是文章标题 topic: id --- 文章正文
|
分类和标签
在文章的front-matter中添加categories和tags字段,只要文章有分类和标签就会自动在主页出现「分类」、「标签」选项卡实现分类浏览,不需要手动添加页面。例如:
source\_posts\一篇文章.md1 2 3 4 5
| --- categories: [Hexo折腾记, Stellar主题] tags: [Stellar] --- 文章正文
|