jooy2 / vitepress-sidebar

🔌 VitePress Sidebar is a plugin for VitePress that automatically configures and manages the sidebar of your page with simple settings.
https://vitepress-sidebar.cdget.com
MIT License
168 stars 8 forks source link

Is it possible to specify a pattern for a filename to be used as the "index" file? #163

Open pixeloution opened 3 months ago

pixeloution commented 3 months ago

Hello. Attempting to use your very nice plugin to generate menus for existing markdown projects that follow a format of "00. SomeTitle" for the "index" file in each directory.

Is there a way to specify this pattern for Vitepress-Sidebar, or do I have to rename the files in index.md and use frontmatter to provide the name in the UI?

jooy2 commented 3 months ago

Hello, thank you for using vitepress-sidebar.

Unfortunately, vitepress-sidebar does not currently have a feature that can fulfill your requirements. Yes, you will have to use the method of renaming the menu in the index.md file via the title in the frontmatter. https://vitepress-sidebar.jooy2.com/guide/api#usetitlefromfileheading

I'm not sure of the demand for this feature, but i think this issue could be related to features like "auto-numbering" that are not yet implemented, so I'll leave the issue open.

Regards,