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

parameter to customize the length of toc #326

Closed
kbhawkey opened this issue Aug 14, 2020 · 2 comments · Fixed by #1147
Closed

parameter to customize the length of toc #326

kbhawkey opened this issue Aug 14, 2020 · 2 comments · Fixed by #1147

Comments

@kbhawkey
Copy link

Hi. The theme's toc template (partials/layout/toc.html) checks the length of
the Table of Contents to determine whether to display the list of headings.
In pages that are data intensive (contain a number of tables) but have few headings, it would
help readers navigate through the page.
I could customize the partial template, but wonder if this is something to consider as a change to the theme.
Possibly add a new site parameter (default to 200) and update the partial to check this parameter.
Sites could override this parameter.

@LisaFC
Copy link
Collaborator

LisaFC commented Aug 24, 2020

If you can see a use case for parameterizing it, then by all means go ahead - if you leave 200 as the default then it won't break existing sites and most users will get reasonable behaviour.

@kbhawkey
Copy link
Author

For now, I will override the theme's toc partial and get feedback on the additional headings. Thanks!
/close

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

Successfully merging a pull request may close this issue.

2 participants