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

TOC parameters and improvements #39

Closed
majkinetor opened this issue Jan 31, 2021 · 4 comments
Closed

TOC parameters and improvements #39

majkinetor opened this issue Jan 31, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@majkinetor
Copy link

majkinetor commented Jan 31, 2021

Consider adding the following ToC parameters:

toc_title: 'Table of Contents'
toc_depth: 1  #level

Depth could be used to produce less spammy TOC, containing for example only navigation section without page TOC.

TOC also includes ↵ symbol and has non linked entries (those that are 'level 2' or higher):

non linked entries

image

I have this in mkdocs.yaml

markdown_extensions:
    - toc:
        permalink: ↵

I guess it should be removed from the links.

Regarding non-linked 2nd level entries, I can hide those with .toc-nav-section-title-level-2 {display none} etc.

@majkinetor majkinetor changed the title TOC parameters TOC parameters and improvements Jan 31, 2021
@timvink timvink added the enhancement New feature or request label Feb 2, 2021
@timvink
Copy link
Owner

timvink commented Feb 2, 2021

Yup, both parameters make sense & can be added.

Removing the permalink was an edgecase I had not considered yet, thanks for reporting!

Will pick this up for next release, and of course feel free to make a PR if you want it earlier :)

@timvink
Copy link
Owner

timvink commented Feb 22, 2021

Will release a new version with toc_title and toc_depth soon (edit: released: https://github.com/timvink/mkdocs-print-site-plugin/releases)

I am having trouble reproducing the bug you have with the toc permalink & unlinked level 2 entries. Do you have a public project example by any chance?

@timvink timvink added bug Something isn't working and removed enhancement New feature or request labels Feb 22, 2021
@majkinetor
Copy link
Author

I confirm toc link and depth works.

Permlink still there tho, did you look at above demo page ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants