vue.jswebvuepress

VuePress : Custom Contents in Sidebar for Exery Single Page


I would like to have custom links and different sidebar for every single page I don't want my headings render as table of contents in sidebar I would like to have custom content like this.

Node JS
-Lecture 1 Introduction
--Sub Lecture

-Lecture 2 Basics
--Sub Lecture
---Nested Lecture

Where all the lectures are custom links. So how can I do that.


Solution

  • sidebar

    module.exports = {
      themeConfig: {
        // sidebar object
        // pages under different sub paths will use different sidebar
        sidebar: {
          '/guide/': [
            {
              text: 'Guide',
              children: ['/guide/README.md', '/guide/getting-started.md'],
            },
          ],
          '/reference/': [
            {
              text: 'Reference',
              children: ['/reference/cli.md', '/reference/config.md'],
            },
          ],
        },
      },
    }
    

    For more info see Sidebar Config