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

Create new TableOfContents Page variable #153

Closed
nwidger opened this issue Dec 12, 2013 · 6 comments
Closed

Create new TableOfContents Page variable #153

nwidger opened this issue Dec 12, 2013 · 6 comments

Comments

@nwidger
Copy link
Contributor

nwidger commented Dec 12, 2013

The Markdown converter that hugo ueses, blackfriday.Markdown, supports outputting only a table of contents for its input by passing HTML_TOC and HTML_OMIT_CONTENTS into the first parameter of blackfriday.HtmlRenderer. hugo could be modified to have a new TableOfContents Page variable using these options. This would be very useful for large article that have many headers, even if it's only available for Markdown pages.

@nwidger
Copy link
Contributor Author

nwidger commented Dec 20, 2013

I don't know if this would still be useful to others, but I wound up using Tocify to generate a table of contents dynamically using Javascript. Feel free to close this issue if you wish.

@spf13
Copy link
Contributor

spf13 commented Jan 15, 2014

This is a great idea. I'd be glad to take a pull request on this. I don't think it would be much work given the diligence you've already put in. If not, I'll take a swing at it.

@nwidger
Copy link
Contributor Author

nwidger commented Jan 18, 2014

Sorry for the delay. I'll give this a shot and let you know if I run into any snags.

@nwidger
Copy link
Contributor Author

nwidger commented Jan 20, 2014

I opened a pull request with my attempt at adding this feature. Let you know what you think.

@spf13
Copy link
Contributor

spf13 commented Jan 29, 2014

Merged

@spf13 spf13 closed this as completed Jan 29, 2014
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants