pengzhanbo 4d2361a704
feat(theme)!: add collections support (#704)
* feat(theme)!: add collection support
2025-10-07 23:13:09 +08:00

35 lines
1.3 KiB
Handlebars

/**
* @see https://theme-plume.vuejs.press/config/navigation/ 查看文档了解配置详情
*
* Navbar 配置文件,它在 `.vuepress/plume.config.{{#if useTs}}ts{{else}}js{{/if}}` 中被导入。
*/
import { defineNavbarConfig } from 'vuepress-theme-plume'
{{#if multiLanguage}}
{{#each locales}}
export const {{prefix}}Navbar = defineNavbarConfig([
{ text: '{{#if isEn}}Home{{else}}首页{{/if}}', link: '{{ path }}' },
{ text: '{{#if isEn}}Blog{{else}}博客{{/if}}', link: '{{ path }}blog/' },
{ text: '{{#if isEn}}Tags{{else}}标签{{/if}}', link: '{{ path }}blog/tags/' },
{ text: '{{#if isEn}}Archives{{else}}归档{{/if}}', link: '{{ path }}blog/archives/' },
{
text: '{{#if isEn}}Notes{{else}}笔记{{/if}}',
items: [{ text: '{{#if isEn}}Demo{{else}}示例{{/if}}', link: '{{ path }}demo/README.md' }]
},
])
{{/each}}
{{else}}
export default defineNavbarConfig([
{ text: '{{#if isEn}}Home{{else}}首页{{/if}}', link: '/' },
{ text: '{{#if isEn}}Blog{{else}}博客{{/if}}', link: '/blog/' },
{ text: '{{#if isEn}}Tags{{else}}标签{{/if}}', link: '/blog/tags/' },
{ text: '{{#if isEn}}Archives{{else}}归档{{/if}}', link: '/blog/archives/' },
{
text: '{{#if isEn}}Notes{{else}}笔记{{/if}}',
items: [{ text: '{{#if isEn}}Demo{{else}}示例{{/if}}', link: '/demo/README.md' }]
},
])
{{/if}}