vike-vue-content

Configure directory-level navigation with .config.yml, and set page/directory redirects.

Directory Config & Redirects

Beyond per-file frontmatter, you can place a .config.yml file in any content directory to configure the whole directory.

Directory-level navigation

# content/docs/guide/.config.yml
navigation:
  label: Guide
  icon: book
  description: A collection of how-to guides
FieldTypeDescription
navigation.titlestringThe directory's group title in the sidebar.
navigation.labelstringAn alternative label.
navigation.descriptionstringGroup description.
navigation.iconstringIcon identifier (interpreted by your nav component).
navigation.hiddenbooleanHide the whole directory group, including its children.
navigation.flattenbooleanPromote children to the parent level, removing this grouping layer.

hidden: hide a group

navigation:
  hidden: true

The directory disappears from the sidebar, but pages inside it remain accessible by URL.

flatten: collapse a level

navigation:
  flatten: true

Child pages are promoted one level up, removing the "group → children" two-level structure — handy when you don't want an extra layer of nesting.

Redirects

redirect can be set in .config.yml (directory-level) or in Markdown frontmatter (page-level).

Directory redirect

Commonly used to redirect a collection's root path to a specific doc:

# content/en-US/.config.yml
navigation:
  hidden: true
redirect: /introduction

Visiting /en-US automatically jumps to /en-US/introduction.

Page redirect

---
redirect: /en-US/guide/routing
---

How redirect targets resolve

  • Absolute protocol links (e.g. https://..., mailto:...) are kept as-is.
  • Internal relative paths are automatically prefixed with the current collection's base. For example, writing redirect: /introduction in a collection whose base is /en-US resolves to /en-US/introduction.
  • If the target already includes the base prefix, it isn't added twice.
The framework collects redirect rules across the whole workspace at build time. If the same source path has conflicting targets, it throws an error so you catch the misconfiguration early.