From b4d77e10d376ac0e8912272acbc060434f56ba53 Mon Sep 17 00:00:00 2001 From: IZUMI-Zu <274620705z@gmail.com> Date: Thu, 24 Oct 2024 15:18:11 +0800 Subject: [PATCH] feat: make sidebar always show (#6) --- docusaurus.config.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 80e3b0b..efd6976 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -33,13 +33,16 @@ module.exports = { ({ docs: { sidebarPath: "./sidebars.js", - editUrl: - "https://github.com/casdoor/casdoor-app/tree/main/docs/", + sidebarCollapsed: false, + editUrl: ({docPath}) => { + return `https://github.com/casdoor/casdoorapp-website/edit/master/docs/${docPath}`; + }, }, blog: { showReadingTime: true, - editUrl: - "https://github.com/casdoor/casdoorapp-website/", + editUrl: ({blogDirPath, blogPath}) => { + return `https://github.com/casdoor/casdoorapp-website/edit/master/${blogDirPath}/${blogPath}`; + }, }, theme: { customCss: "./src/css/custom.css", @@ -59,8 +62,8 @@ module.exports = { }, items: [ { - type: "docSidebar", - sidebarId: "tutorialSidebar", + type: "doc", + docId: "overview", position: "left", label: "Docs", },