mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-05 19:06:37 +02:00
🛠 refactor: redundancy
This commit is contained in:
41
sidebars.ts
41
sidebars.ts
@@ -1,30 +1,45 @@
|
|||||||
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
|
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creating a sidebar enables you to:
|
* Sidebars Configuration for Docusaurus Documentation
|
||||||
- create an ordered group of docs
|
*
|
||||||
- render a sidebar for each doc of that group
|
* This configuration enables you to:
|
||||||
- provide next/previous navigation
|
* - Automatically generate a sidebar based on the folder structure.
|
||||||
|
* - Manually define a custom sidebar structure if needed.
|
||||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
*
|
||||||
|
* You can switch between autogenerated and manual sidebars based on your requirements.
|
||||||
Create as many sidebars as you want.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const sidebars: SidebarsConfig = {
|
const sidebars: SidebarsConfig = {
|
||||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
/**
|
||||||
|
* Autogenerated Sidebar:
|
||||||
|
* Automatically generates a sidebar from the file structure in the "docs" directory.
|
||||||
|
* Useful for projects with a straightforward or hierarchical content layout.
|
||||||
|
*/
|
||||||
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
|
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
|
||||||
|
|
||||||
// But you can create a sidebar manually
|
/**
|
||||||
|
* Example Manual Sidebar (Commented):
|
||||||
|
* Uncomment the following section if you'd like to define a sidebar manually.
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
tutorialSidebar: [
|
tutorialSidebar: [
|
||||||
|
// Single document reference
|
||||||
'intro',
|
'intro',
|
||||||
'hello',
|
'hello',
|
||||||
|
// Category with nested items
|
||||||
{
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
label: 'Tutorial',
|
label: 'Tutorial',
|
||||||
items: ['tutorial-basics/create-a-document'],
|
collapsible: true,
|
||||||
|
collapsed: false,
|
||||||
|
items: ['tutorial-basics/create-a-document', 'tutorial-basics/deploy-your-site'],
|
||||||
|
},
|
||||||
|
// External link example
|
||||||
|
{
|
||||||
|
type: 'link',
|
||||||
|
label: 'Docusaurus Docs', // Link label
|
||||||
|
href: 'https://docusaurus.io', // URL
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user