-
Notifications
You must be signed in to change notification settings - Fork 3
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
Option to make Obsidian the entire sidebar without requiring a root node. #5
Comments
Thanks for the feedback, I think this makes sense. Unfortunately, I don't think this is something I can implement at the moment as this would require a change in Starlight. The current sidebar generation relies on Starlight autogenerated groups which are always a group. I think this is a valid use case that I have already encountered multiple times so I think the best solution would be to open a feature request on the Starlight repository and see if this is something that can be implemented in the future. |
Hmm - what if the user provided a folder depth underneath the root node to the plugin and then it could run the file tree, work out which folders should be at the "root" and then return back multiple groups for each folder at that depth. Let's say we have a vault with subfolders A and B then currently the plugin returns the following sidebar configuration: [
{
label: 'Wiki',
autogenerate: { directory: 'Wiki' }
}
] and we get the following sidebar
If a user supplies [
{
label: 'A',
autogenerate: { directory: 'Wiki/a' }
},
{
label: 'B',
autogenerate: { directory: 'Wiki/b' }
}
] and we get the following sidebar
Happy to draw a diagram if that isn't clear enough? |
@nmboris that's a creative way to get around it indeed - let me try that and see the results in my repo :D |
This is indeed doable through configuration, altho it has several downsides depending on who is in charge of handling the configuration:
Hitting this limitation with multiple plugins is what is making me think that a Starlight solution would be beneficial for everyone. |
Yeah have to agree with this - even trying to maintain this for a few folders was annoying enough so I can't image if I had to maintain more than 5 if it would be worth it - I decided to write my own function that spat out autogenerated group of the subfolders of the root of my vault - works a treat and lets me decorate the titles with emojis which is nice. Happy to close this issue if you think this is better solved within starlight @HiDeoo |
I would prefer to keep it open. If Starlight implement something to help with this issue, it will be a good reminder to update the plugin and add support for this. If not, it will also be a good reminder that the plugin should be updated to solve this issue as I still think it's a totally valid use-case encountered already a few times. |
Is your feature request related to a problem?
I want to use Obsidian as the entirety of my Astro site, I have been hacking together my own sub-par version of this but want to switch to this ASAP. It is small annoyance that I can't seem to have my obsidian subfolders be the root nodes of the sidebar and must have them nested under a singular root node.
Describe the solution you'd like
A configuration option
disableRootNode: true | false
to tell the plugin to not generate the subfolders under a root node.Describe alternatives you've considered
I've tried looking at the
obsidianSideBarGroup
array but it's empty at the time I can access it before startlight/astro have started up.Additional Context
Happy to help code this with a pointer or two if you're too busy on more important things. Massive props for making this plugin.
The text was updated successfully, but these errors were encountered: