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
I'm wondering if it's possible to implement the functionality in this outstanding pull request via existing Vitepress config?
My initial plan was to use _render to inject new HTML section header elements, one for each parent title and then modify all existing section header level such that they are "beneath" the injected section headers.
For example, for a page like this which sits under foo/bar in the sidebar heirarchy:
<html><body><h1>Hello!</h1><!-- rest of content --></body></html>
Transform it to this:
<html><body><h1>foo</h1><h2>bar</h2><h3>Hello!</h3><!-- rest of content --></body></html>
However, I don't think I can get access to the required sidebar information during the _render call to actually calculate the sidebar items/parent titles.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm wondering if it's possible to implement the functionality in this outstanding pull request via existing Vitepress config?
My initial plan was to use
_render
to inject new HTML section header elements, one for each parent title and then modify all existing section header level such that they are "beneath" the injected section headers.For example, for a page like this which sits under
foo/bar
in the sidebar heirarchy:Transform it to this:
However, I don't think I can get access to the required sidebar information during the
_render
call to actually calculate the sidebar items/parent titles.Can anyone confirm if this is possible or not?
Thanks,
G
Beta Was this translation helpful? Give feedback.
All reactions