Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Table of contents for wiki page #238

Open
elacy opened this issue Apr 15, 2015 · 3 comments
Open

Table of contents for wiki page #238

elacy opened this issue Apr 15, 2015 · 3 comments

Comments

@elacy
Copy link

elacy commented Apr 15, 2015

On Wikipedia you can add a table of contents for a really long page that uses the headings. Is it possible to add a feature like that to pretzel? Perhaps a flag in at the top of the page along with layout and title?

@laedit
Copy link
Member

laedit commented Apr 15, 2015

There is nothing like this in Pretzel, but PR are welcome! 😃
I like the idea but haven't time to work on it...

@laedit
Copy link
Member

laedit commented Apr 16, 2015

After some thinking I believe that a custom IContentTransform can do the trick, by parsing the HTML of the page, get all titles, build the TOC and replace a special token (like <!-- TOC --> maybe? I don't know what Wikipedia use.) by the TOC.

@laedit
Copy link
Member

laedit commented Apr 22, 2015

By the way, if you end up creating a plugin and you want to share it, please let us know the repo that we can add in our (future) wiki page for all plugins. 😄

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

No branches or pull requests

2 participants