Skip to content

Theme

VuePress theme can provide layouts, styles and many other features for you, helping you to focus on writing Markdown content.

Default Theme

VuePress provides a default theme, which is applied to our documentation site you are currently browsing.

You need to import and use it in your config file via the theme option:

import { themeDefault } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'

export default defineUserConfig({
  theme: themeDefault({
    // default theme config
    nav: [
      {
        text: 'Home',
        link: '/',
      },
    ],
  }),
})

The default theme provides basic but useful features for documentation site, you can check out Default Theme Config Reference for a full list of config.

Tips

The theme that used to be the default theme of VuePress is now published as @vuepress/theme-classic and exported as themeClassic. It keeps the configuration API of the former default theme.

However, you might think it is not good enough. Or, you want to build a different type of site, for example, a blog, instead of a documentation. Then, you can try to use a community theme or create a local theme.

Community Theme

Community users have created lots of theme and published them to NPM. You should check the theme's own documentation for detailed guide.

You can explore more themes in VuePress Marketplace.

Local Theme

If you want to use your own custom theme but don't want to publish it, you can create a local theme. Refer to Advanced > Writing a Theme for how to write your own theme.

MIT Licensed