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

table of contents: toc = true - please add support #42

Closed
mbana opened this issue Aug 22, 2017 · 5 comments
Closed

table of contents: toc = true - please add support #42

mbana opened this issue Aug 22, 2017 · 5 comments
Milestone

Comments

@mbana
Copy link

mbana commented Aug 22, 2017

hi,

please add support for this.

mbana-mb:cv mbana$ ll
total 24K
drwxr-xr-x 2 mbana staff  170 Aug 22 15:07 .
drwxr-xr-x 5 mbana staff  204 Aug 22 15:01 ..
-rw-r--r-- 1 mbana staff  577 Aug 22 15:07 _index.md
-rw-r--r-- 1 mbana staff 1020 Aug 22 15:11 cover-letter.md
-rw-r--r-- 1 mbana staff  13K Aug 22 15:10 resume.md

in resume.md i want all the headings to show up on the right-hand side of the page. currently it only lists the other pages in the same directory.

Thanks a lot,

@budparr
Copy link
Member

budparr commented Aug 22, 2017

Good idea. I'll try to look soon, and if you want to accomplish this now, you could duplicate this template into your root folder and overwrite it there: https://github.com/budparr/gohugo-theme-ananke/blob/master/layouts/partials/menu-contextual.html

So, in your site, it would be making a copy from:
themes/gohugo-theme-ananke/layouts/partials/menu-contextual.html
to here:
layouts/partials/menu-contextual.html

@budparr budparr self-assigned this Aug 22, 2017
@zzamboni
Copy link

@mbana I recently dealt with this - if you want to take a look, here's the simple toc.html file I'm using at my website zzamboni.org: https://github.com/zzamboni/zzamboni.org/blob/master/layouts/partials/toc.html. I'm using the builtin .TableOfContents, processing it to show up on the right-hand on a similar style to the "other posts" box.

@mbana
Copy link
Author

mbana commented Aug 23, 2017

thanks @zzamboni.
I had a look. +1 for merge.

@budparr
Copy link
Member

budparr commented Oct 12, 2017

I think this is a good idea, and a good opportunity to use some Hugo native functionality. I'm working on a new version of the theme and will include a provision for this. Thanks for your patience, I've been swamped lately.

@budparr budparr added this to the 2.0 milestone Oct 12, 2017
@budparr budparr removed their assignment Jan 15, 2018
budparr pushed a commit that referenced this issue Apr 9, 2018
budparr pushed a commit that referenced this issue Apr 9, 2018
@budparr
Copy link
Member

budparr commented Apr 9, 2018

This is now added. Thanks!

@budparr budparr closed this as completed Apr 9, 2018
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

3 participants