Skip to content

docs: update sidebar link formatting #2577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
- [Embed Files](embed-files.md)
- [UI Kit](ui-kit.md)

- [Awesome docsify](awesome.md)
- [Changelog](changelog.md)
* [Awesome docsify](awesome.md)
* [Changelog](changelog.md)
4 changes: 2 additions & 2 deletions src/core/event/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ export function Events(Base) {
dom.on(sidebarElm, 'click', ({ target }) => {
const linkElm = target.closest('a');
const linkParent = linkElm?.closest('li');
const subSidebar = linkParent?.querySelector('.app-sub-sidebar');
const hasSubSidebar = linkParent?.querySelector('.app-sub-sidebar');

if (subSidebar) {
if (hasSubSidebar) {
dom.toggleClass(linkParent, 'collapse');
}
});
Expand Down
3 changes: 0 additions & 3 deletions src/core/fetch/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-unused-vars */
import { getParentPath, stringifyQuery } from '../router/util.js';
import { noop, isExternal } from '../util/core.js';
import { get } from '../util/ajax.js';
Expand Down Expand Up @@ -262,8 +261,6 @@ export function Fetch(Base) {
}

initFetch() {
const { loadSidebar } = this.config;

this.$fetch(_ => this.callHook('ready'));
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/integration/__snapshots__/docs.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ exports[`Docs Site sidebar renders and is unchanged 1`] = `

<div class="sidebar-nav" role="navigation" aria-label="primary"><!-- markdownlint-disable first-line-h1 -->

<ul><li><p>Getting started</p><ul><li><a href="#/quickstart" class="page-link">Quick start</a></li><li><a href="#/adding-pages" class="page-link">Adding pages</a></li><li><a href="#/cover" class="page-link">Cover page</a></li><li><a href="#/custom-navbar" class="page-link">Custom navbar</a></li></ul></li><li><p>Customization</p><ul><li><a href="#/configuration" class="page-link">Configuration</a></li><li><a href="#/themes" class="page-link">Themes</a></li><li><a href="#/plugins" class="page-link">List of Plugins</a></li><li><a href="#/write-a-plugin" class="page-link">Write a Plugin</a></li><li><a href="#/markdown" class="page-link">Markdown configuration</a></li><li><a href="#/language-highlight" class="page-link">Language highlighting</a></li><li><a href="#/emoji" class="page-link">Emoji</a></li></ul></li><li><p>Guide</p><ul><li><a href="#/deploy" class="page-link">Deploy</a></li><li><a href="#/helpers" class="page-link">Helpers</a></li><li><a href="#/vue" class="page-link">Vue compatibility</a></li><li><a href="#/cdn" class="page-link">CDN</a></li><li><a href="#/pwa" class="page-link">Offline Mode (PWA)</a></li><li><a href="#/embed-files" class="page-link">Embed Files</a></li><li><a href="#/ui-kit" class="page-link">UI Kit</a></li></ul></li><li><p><a href="#/awesome" class="page-link">Awesome docsify</a></p></li><li><p><a href="#/changelog" class="page-link">Changelog</a></p></li></ul></div>
<ul><li><p>Getting started</p><ul><li><a href="#/quickstart" class="page-link">Quick start</a></li><li><a href="#/adding-pages" class="page-link">Adding pages</a></li><li><a href="#/cover" class="page-link">Cover page</a></li><li><a href="#/custom-navbar" class="page-link">Custom navbar</a></li></ul></li><li><p>Customization</p><ul><li><a href="#/configuration" class="page-link">Configuration</a></li><li><a href="#/themes" class="page-link">Themes</a></li><li><a href="#/plugins" class="page-link">List of Plugins</a></li><li><a href="#/write-a-plugin" class="page-link">Write a Plugin</a></li><li><a href="#/markdown" class="page-link">Markdown configuration</a></li><li><a href="#/language-highlight" class="page-link">Language highlighting</a></li><li><a href="#/emoji" class="page-link">Emoji</a></li></ul></li><li><p>Guide</p><ul><li><a href="#/deploy" class="page-link">Deploy</a></li><li><a href="#/helpers" class="page-link">Helpers</a></li><li><a href="#/vue" class="page-link">Vue compatibility</a></li><li><a href="#/cdn" class="page-link">CDN</a></li><li><a href="#/pwa" class="page-link">Offline Mode (PWA)</a></li><li><a href="#/embed-files" class="page-link">Embed Files</a></li><li><a href="#/ui-kit" class="page-link">UI Kit</a></li></ul></li></ul><ul><li><a href="#/awesome" class="page-link">Awesome docsify</a></li><li><a href="#/changelog" class="page-link">Changelog</a></li></ul></div>
</aside>"
`;
Loading