javascriptvue.jsvuepress

Disable vuepress homepage and redirect to guide


I've just started looking at vuepress to use as a documentation generator to one of my open-source tools (https://github.com/redskap/swagger-brake) and the tools seems to be the right fit for the job.

However, I'm kind of struggling with setting up the proper configuration. I've followed the official docs, and the base project is alright. The only thing I want to change is to get rid of the "homepage" when loading the root URL and have users being redirected to the "guide".

Hope you have some ideas. Thanks!


Solution

  • Reviewing the github link it needs to be updated with the following.

    index.md should have the intended homepage you'd like to select from the sidebar.

    e.g.

    # Introduction
    ...
    
    // remove frontmatter.yaml
    

    In your config.js

        nav: [
          {
            text: 'Introduction',
            link: '/',
          }
        ],
        sidebar: [
          '/',
       ]       // otherLinks
    

    Examples