Skip to content
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

Exposing tree of page headers #8

Open
f0x52 opened this issue Mar 3, 2019 · 2 comments
Open

Exposing tree of page headers #8

f0x52 opened this issue Mar 3, 2019 · 2 comments

Comments

@f0x52
Copy link

f0x52 commented Mar 3, 2019

Hey, for my site I'd like to be able to dynamically generate a list of the current page's sections. Something like Wikipedia's Content block at the start of a page.
For this I need to access an array of all header markdown objects from handlebars, and they all need to get an id to use in the anchor tag.

Im not sure what the best place would be to hack this in, any ideas?

@Gioni06
Copy link
Owner

Gioni06 commented Mar 4, 2019

Hm.. interesting. The compiler uses unified as a text parsing engine. You could checkout if there is a plugin that extracts this data. You could then attach it to the Edge as a “sections” array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants