docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Remove front matter from sidebars with front-matter plugin

Open ErikApption opened this issue 2 years ago • 1 comments

Feature request

What problem does this feature solve?

Enable yaml front matter in sidebars

What does the proposed API look like?

I am not sure if the current hook.beforeEach is processed with sidebars. Is there an existing hook for sidebar rendering?

How should this be implemented in your opinion?

Add a hook for sidebar rendering and add the beforeEach in front-matter to the sidebar hook.

Are you willing to work on this yourself?

Would need a bit of guidance on the sidebar rendering

ErikApption avatar Mar 09 '23 22:03 ErikApption

Hi @ErikApption , IIUC, do you wanna process/parser the text of sidebar before it to be rendered? Currently, docsify doesn't have expose the sidebar content via hooks yet. FYI, At this part above, the text is the original content of sidebar and gonna be rendered to html. https://github.com/docsifyjs/docsify/blob/898e6eea7a7d5bf34a428d672d6a1b8c7896d183/src/core/render/compiler.js#L268

Koooooo-7 avatar Mar 12 '23 10:03 Koooooo-7