CIMSTA / obsidiosaurus

Obsidian -> Docusaurus Converter
https://cimsta.github.io/obsidiosaurus-docs/
MIT License
143 stars 12 forks source link

Sidebar Improvements #4

Closed Mat4m0 closed 1 year ago

Mat4m0 commented 1 year ago

Description

Automate the workflow for sidebar creation based on the first folders in Obsidian "docs" Directory.

Changes to sidebar.js:

const sidebars = {
  A: [{type: 'autogenerated', dirName: 'A'}],
  X: [{type: 'autogenerated', dirName: 'X'}],
 ...

docusaurus.config.js:


const config = { 
   themeConfig:
    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
    ({
     navbar: {
 items: [
          {
            type: 'doc',
            docId: 'A/a',
            position: 'left',
            label: 'a',
          },
          {
            type: 'doc',
            docId: 'X/x',
            position: 'left',
            label: 'x',
          },
                    {to: '/blog', label: 'Blog', position: 'left'},
          {
            type: 'localeDropdown',
            position: 'right',
          },
                  ],
      },
module.exports = config;          
Mat4m0 commented 1 year ago

Better not play around with Docusaurus config files