diff --git a/template/content/2.guide/2.configuration.md b/template/content/2.guide/2.configuration.md index f927bcf1b..aea53723f 100644 --- a/template/content/2.guide/2.configuration.md +++ b/template/content/2.guide/2.configuration.md @@ -90,10 +90,10 @@ export default defineAppConfig({ | `header.logo` | `boolean` | | Whether or not to use `Logo.vue` as the header logo | | `header.title` | `string` | | If set to a string, will be used in the header | | `header.showLinksIcons` | `boolean` | | If set to `true` links icons will show in the header | +| `header.exclude` | `string[]` | | An array of path to exclude out from the header navigation | | **Aside** | | | | | `aside` | `object` | | Aside configuration | | `aside.level` | `string` | 0 | Aside base level of nesting | -| `aside.filter` | `string[]` | | An array of path to filter out from the navigation | | `aside.collapsed` | `boolean` | | Will be used as default value for collapsible navigation categories | | **Footer** | | | | | `footer` | `object` | | Footer configuration | diff --git a/theme/app.config.ts b/theme/app.config.ts index 3399a1f8c..4529e03a6 100644 --- a/theme/app.config.ts +++ b/theme/app.config.ts @@ -20,7 +20,8 @@ export default defineAppConfig({ header: { title: '', logo: false, // TODO: handle logo as string for component - showLinksIcons: false // Toggle links icons in the header + showLinksIcons: false, // Toggle links icons in the header + exclude: [] }, footer: { credits: { @@ -32,3 +33,13 @@ export default defineAppConfig({ } } }) + +// TODO: declare types when happy about them +// declare module '@nuxt/schema' { +// interface AppConfigInput { +// docus?: { +// /** Project name */ +// title?: string +// } +// } +// } diff --git a/theme/components/AppLayout.vue b/theme/components/AppLayout.vue index b3c3ce498..038e8d6ef 100644 --- a/theme/components/AppLayout.vue +++ b/theme/components/AppLayout.vue @@ -4,7 +4,7 @@ const { navigation, page } = useContent() const { navKeyFromPath } = useContentHelpers() const titleTemplate = computed(() => { - const appTitleTemplate = docus.value.head?.titleTemplate || `%s | ${docus.value.title}` + const appTitleTemplate = docus.value.head?.titleTemplate || `%s ยท ${docus.value.title}` if (page.value) { return page.value.head?.titleTemplate || navKeyFromPath(page.value._path, 'titleTemplate', navigation.value) || appTitleTemplate } diff --git a/theme/components/NavbarCenter.vue b/theme/components/NavbarCenter.vue index c4a8d12e1..07587f49e 100644 --- a/theme/components/NavbarCenter.vue +++ b/theme/components/NavbarCenter.vue @@ -6,7 +6,7 @@ const docus = useDocus() const hasNavigation = computed(() => !!docus.value.aside?.level) -const filtered = computed(() => docus.value.aside?.filter || []) +const filtered = computed(() => docus.value.header?.exclude || []) const tree = computed(() => { return (navigation.value || []).filter((item) => {