You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jooy, love your module! While working with it, I thought of this way to make it even more modulair & allow for a more refined configuration:
Currently, the configuration for sidebar(s) is the one set of values, which apply to the whole sidebar. One thing I came across is that for some subfolders (for the same sidebar), I would like to have a different set of settings.
Proposal: for each folder, the module would check (while traversing) if there is a vitepress-sidebar.json file (or use the frontmatter section in index.md file that people probably already use to name the folder?); any setting in that file would override the value passed on from the parent folder.
The benefit is that the settings are contained within this folder, and one could easily move folder around. Refine per folder the file exclusions, not having to do this at the main level. Et cetera.
Looking at the code:
The settings check at the start needs to be refactored into a method e.g. checkSettings()
That vitepress-sidebar.json would need to be checked for existence first thing into the method, before this line at
Hi Jooy, love your module! While working with it, I thought of this way to make it even more modulair & allow for a more refined configuration:
Currently, the configuration for sidebar(s) is the one set of values, which apply to the whole sidebar. One thing I came across is that for some subfolders (for the same sidebar), I would like to have a different set of settings.
Proposal: for each folder, the module would check (while traversing) if there is a
vitepress-sidebar.json
file (or use the frontmatter section inindex.md
file that people probably already use to name the folder?); any setting in that file would override the value passed on from the parent folder.The benefit is that the settings are contained within this folder, and one could easily move folder around. Refine per folder the file exclusions, not having to do this at the main level. Et cetera.
Looking at the code:
vitepress-sidebar.json
would need to be checked for existence first thing into the method, before this line atvitepress-sidebar/lib/index.ts
Line 346 in 280e3b0
options
Notes:
scanStartPath
folder (ordocumentRootPath
if not set) could then have the same file, giving the default/initial values.rootGroupText
andincludeRootIndexFile
(anything related to the root folder?)The text was updated successfully, but these errors were encountered: