ozum / vuepress-bar

VuePress sidebar and navbar generator based on file and directory structure. Focus your documents, not sidebar or navbar.
90 stars 40 forks source link

Sidebar won't display #4

Closed macguirerintoul closed 4 years ago

macguirerintoul commented 5 years ago

Hi there,

First of all, thanks for creating this — but I can't get it to work with my Vuepress instance. Below is my .vuepress/config.js. My directory structure is as follows. I would like to have a different sidebar for /en, /fr, etc. as they will be in different languages. Can you spot what I'm doing wrong?

./
  |- .vuepress/
    |- config.js
  |- en/
    |- 01.about/
      |- introduction.md
      |- contributing.md
    |- 02.terms/
      |- example.md
      |- test.md
  |- fr/
    |- ...
const getConfig = require('vuepress-bar');
const config = getConfig('en');
console.log(config)

module.exports = {
  port: 3000,
  serviceWorker: true,
  ga: 'UA-144587327-1',
  themeConfig: {
    themeConfig: {
      nav: [
        { text: 'Home', link: '/' },
        {
          text: 'GitHub',
          link: 'https://github.com/mrintoul/DesignDictionary.xyz',
        },
        ...config.nav,
      ],
      sidebar: config.sidebar,
    },
    locales: {
      '/': {
        label: 'English',
      },
      '/fr/': {
        label: 'Français',
        selectText: 'Langues',
        nav: [
          { text: 'Accueil', link: '/fr/' },
          {
            text: 'GitHub',
            link: 'https://github.com/mrintoul/DesignDictionary.xyz',
          },
        ],
        // sidebar: getSidebar('./fr/'),
      },
    },
  },
  locales: {
    '/': {
      lang: 'en-US',
      title: 'DesignDictionary.xyz',
      description: 'The open-source dictionary for design',
    },
    '/fr/': {
      lang: 'fr',
      title: 'DesignDictionary.xyz',
      description: 'Le dictionnaire source-ouverte pour design',
    },
  },
};
ozum commented 5 years ago

Sorry for late answer. Github didn't sent me notifications for this repo.

Could you please provide a sample repo, so I can examine the problem. Thanks.

AGDholo commented 5 years ago

@ozum you need click "watch" button in the head of page to recive notification

ozum commented 5 years ago

Ahh it was in not watching state for this repo, I don't know why. Changed that. Thanks.

ozum commented 4 years ago

Since I could not reproduce the problem and no example repo provided for a long time, I'm closing the case. Please feel free to create another case with a sample repo.