Skip to content

Commit

Permalink
chore(website): migrate sidebars.js -> sidebars.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw committed Jan 8, 2025
1 parent 2c2bd84 commit df70b22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docusaurus/website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const config: Config = {
docs: {
path: '../docs',
exclude: ['**/snippets/**', '**/shared/**', '**/drafts/**'],
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/grafana/plugin-tools/edit/main/docusaurus/website',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
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:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
// tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],

docs: [{type: 'autogenerated', dirName: '.'}],
docs: [{ type: 'autogenerated', dirName: '.' }],
};

module.exports = sidebars;
export default sidebars;

0 comments on commit df70b22

Please sign in to comment.