Skip to content

Commit

Permalink
The table of contents (when enabled) will now only be displayed in th…
Browse files Browse the repository at this point in the history
…e print version
  • Loading branch information
timvink committed Sep 13, 2021
1 parent d4d4fe3 commit 436fbad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins:
: Default is `'Print Site'`. When `add_to_navigation` is set to `true` this setting controls the name of the print page in the navigation of the site. This setting is ignored when `add_to_navigation` is set to `false`.

`add_table_of_contents`
: Default is `true`. Adds a table of contents section at the beginning of the print page.
: Default is `true`. Adds a table of contents section at the beginning of the print page (in print version, not HTML version).

`toc_title`
: Default is `'Table of Contents'`. When `add_table_of_contents` is set to `true` this setting controls the name of the table of contents. This setting is ignored when `add_table_of_contents` is set to `false`.
Expand Down
8 changes: 8 additions & 0 deletions mkdocs_print_site_plugin/css/print-site.css
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ div.print-site-add-full-url section.print-page a[href^="http"]::after{
/*
Print site table of contents styling
*/
/* Don't display the table of contents in HTML version */
#print-page-toc { display: none }


.print-page-toc-nav {
padding-bottom: 2em;
}
Expand Down Expand Up @@ -321,6 +325,10 @@ For now, we added them for use only in the table of contents */
/* Remove print site banner */
#print-site-banner { display: none; }

/* display the table of contents in print version */
#print-page-toc { display: block }


/* Ensure all tabbed content is displayed and printed
https://squidfunk.github.io/mkdocs-material/reference/content-tabs/ */
/* #print-site-page div.tabbed-content { display: block !important; } */
Expand Down

0 comments on commit 436fbad

Please sign in to comment.