说明
适合仅在一个页面或项目中才需要用到的组件,例如在某个页面的侧边栏放一个公告。
匿名组件会覆盖 index 页面定义的 leftbar 组件,所以侧边栏只有自定义的内容。
使用
本页面的 front-matter 设置如下:
1 | title: 匿名组件的使用 |
同时不要忘了在 source/_data/wiki/notes.yml 进行修改:
1 | tree: |
另外这里的 cover, tags, categories 似乎没有用。
插件笔记
适合仅在一个页面或项目中才需要用到的组件,例如在某个页面的侧边栏放一个公告。
匿名组件会覆盖 index 页面定义的 leftbar 组件,所以侧边栏只有自定义的内容。
本页面的 front-matter 设置如下:
1 | title: 匿名组件的使用 |
同时不要忘了在 source/_data/wiki/notes.yml 进行修改:
1 | tree: |
另外这里的 cover, tags, categories 似乎没有用。