Migrating From VitePress To Theme Press

Press intentionally feels familiar to VitePress users, but it is not a drop-in .vitepress/config.ts replacement.

  • Move site and theme config into valaxy.config.ts, site.config.ts, or theme.config.ts.
  • Put content in Valaxy’s pages/ directory.
  • Use Valaxy frontmatter such as categories, layout, and search.
  • Configure search through siteConfig.search.provider.
  • Use Valaxy addons when you need integrations such as Algolia, Git log contributors, comments, or music.

Common Mappings

VitePressValaxy + Press
.vitepress/config.tsvalaxy.config.ts, site.config.ts, or theme.config.ts
title, descriptionsiteConfig.title, siteConfig.description
themeConfig.logothemeConfig.logo
themeConfig.navthemeConfig.nav
themeConfig.sidebarthemeConfig.sidebar
themeConfig.socialLinksthemeConfig.socialLinks
themeConfig.editLinkthemeConfig.editLink
themeConfig.footerthemeConfig.footer
lastUpdatedsiteConfig.lastUpdated
localesthemeConfig.locales plus siteConfig.languages
themeConfig.search.provider: 'local'siteConfig.search.provider: 'local'
.vitepress/theme custom layout/componentsSame-name component overrides in the Valaxy site
VitePress pluginsValaxy addons or Vite plugins in valaxy.config.ts

Press supports VitePress-style sidebar arrays, path-keyed multi-sidebars, and { base, items } objects:

valaxy.config.ts
ts
export default defineValaxyConfig<PressTheme.Config>({
  themeConfig: {
    sidebar: {
      '/guide/': {
        base: '/guide/',
        items: [
          {
            text: 'Guide',
            items: [
              { text: 'Introduction', link: '' },
              { text: 'Getting Started', link: 'getting-started' },
            ],
          },
        ],
      },
    },
  },
})

The main Valaxy-specific addition is that a top-level string such as 'guide' still expands from page categories.

Contributors