diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-05-27 16:48:23 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-05-27 16:48:23 +0200 |
commit | e452a7bedabdfe0c0d62aa4e948902d6632a889d (patch) | |
tree | ea638449f93fb820ce3c3df0c6a3ee780edf7d61 | |
parent | 6d64cc708e73c38f23bfc5929608d5d77a9c5a07 (diff) |
#52, Allow to set max showed levels of ToC. e.g. BookToC=3
-rw-r--r-- | README.md | 15 | ||||
-rw-r--r-- | assets/book.scss | 10 | ||||
-rw-r--r-- | exampleSite/config.toml | 5 | ||||
-rw-r--r-- | exampleSite/config.yaml | 5 | ||||
-rw-r--r-- | exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.content | 2 | ||||
-rw-r--r-- | exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.json | 2 | ||||
-rw-r--r-- | layouts/partials/docs/menu-filetree.html | 2 | ||||
-rw-r--r-- | layouts/partials/docs/menu.html | 2 | ||||
-rw-r--r-- | layouts/partials/docs/toc.html | 6 |
9 files changed, 33 insertions, 16 deletions
@@ -15,6 +15,10 @@ - [Shortcodes](#shortcodes) - [Contributing](#contributing) +## Breaking changes + +> ⚠️ At the moment theme is under development, breaking changes might happen. + ## Features - Clean simple design @@ -123,9 +127,10 @@ enableGitInfo = true disableKinds = ['taxonomy', 'taxonomyTerm'] [params] -# (Optional, default true) Show or hide table of contents globally +# (Optional, default 6) Set how many table of contents levels to be showed on page. +# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/) # You can also specify this parameter per page in front matter -BookShowToC = true +BookToC = 3 # (Optional, default none) Set leaf bundle to render as side menu # When not specified file structure and weights will be used @@ -174,8 +179,8 @@ bookFlatSection = true # (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set) bookHidden = true -# (Optional) Set true to hide table of contents, overrides global value -bookShowToC = false +# (Optional) Set how many levels of ToC to show. use 'false' to hide ToC completely +bookToC = 3 ``` ### Partials @@ -235,7 +240,7 @@ Organize text in 2 or more columns to use space efficiently. # Mid Content Lorem markdownum insigne... <---> <!-- magic sparator, between columns --> -# Right Content Lorem markdownum insigne... +# Right Content Lorem markdownum insigne... {{< /columns >}} ``` diff --git a/assets/book.scss b/assets/book.scss index facc13a..66b1e81 100644 --- a/assets/book.scss +++ b/assets/book.scss @@ -147,6 +147,16 @@ ul.pagination { nav > ul > li:first-child { margin-top: 0; } + + // Classes to hide nested levels of ToC (can be replaced by @for, but it's more clear like this) + &.level-1 ul ul, + &.level-2 ul ul ul, + &.level-3 ul ul ul ul, + &.level-4 ul ul ul ul ul, + &.level-5 ul ul ul ul ul ul, + &.level-6 ul ul ul ul ul ul ul { + display: none; + } } .book-footer { diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 11b42dd..63e670b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -15,9 +15,10 @@ enableGitInfo = true pygmentsCodeFences = true [params] - # (Optional, default true) Show or hide table of contents globally + # (Optional, default 6) Set how many table of contents levels to be showed on page. + # Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/) # You can also specify this parameter per page in front matter - BookShowToC = true + BookToC = 3 # (Optional, default none) Set leaf bundle to render as side menu # When not specified file structure and weights will be used diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 9a497c6..6d12d78 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -15,9 +15,10 @@ enableGitInfo: true pygmentsCodeFences: true params: - # (Optional, default true) Show or hide table of contents globally + # (Optional, default 6) Set how many table of contents levels to be showed on page. + # Use false/off to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/) # You can also specify this parameter per page in front matter - BookShowToC: true + BookToC: 3 # (Optional, default none) Set leaf bundle to render as side menu # When not specified file structure and weights will be used diff --git a/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.content b/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.content index f75944e..9cf89d6 100644 --- a/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.content +++ b/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.content @@ -1 +1 @@ -/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.markdown{line-height:1.7}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5{font-weight:400;line-height:1.25}.markdown>:first-child{margin-top:0;line-height:1}.markdown b,.markdown optgroup,.markdown strong{font-weight:700}.markdown a{text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{font-family:oxygen mono,monospace;padding:0 .25rem;background:#f8f9fa;border-radius:.15rem}.markdown pre{padding:1rem;background:#f8f9fa;border-radius:.15rem;font-size:.875rem;overflow-x:auto}.markdown pre code{padding:0;background:0 0}.markdown blockquote{border-left:2px solid #dee2e6;margin:0;padding:1px 1rem}.markdown blockquote :first-child{margin-top:0}.markdown blockquote :last-child{margin-bottom:0}.markdown table{border-spacing:0;border-collapse:collapse}.markdown table tr th,.markdown table tr td{padding:.5rem 1rem;line-height:1;border:1px solid #e9ecef}.markdown table tr:nth-child(2n){background:#f8f9fa}.markdown hr{height:1px;border:none;background:#e9ecef}.markdown-inner>:first-child{margin-top:0}.markdown-inner>:last-child{margin-bottom:0}.book-expand{border:1px solid #e9ecef}.book-expand .book-expand-head{background:#f8f9fa;padding:.5rem 1rem;cursor:pointer}.book-expand .book-expand-content{display:none;padding:1rem}.book-expand input[type=checkbox]:checked+.book-expand-content{display:block}.book-tabs{border:1px solid #e9ecef;display:flex;flex-wrap:wrap}.book-tabs label{display:inline-block;padding:.5rem 1rem;border-bottom:1px transparent;cursor:pointer}.book-tabs .book-tabs-content{order:999;width:100%;border-top:1px solid #f8f9fa;padding:1rem;display:none}.book-tabs input[type=radio]:checked+label{border-bottom:1px solid #004ed0}.book-tabs input[type=radio]:checked+label+.book-tabs-content{display:block}.book-columns>div{max-width:50%}.book-columns>div+div{margin-left:2rem}.flex{display:flex}.flex-auto{flex:1 1 auto}.flex-even{flex:1 1}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.align-center{align-items:center}.mx-auto{margin:0 auto}html{font-size:16px;letter-spacing:.33px;scroll-behavior:smooth}html,body{min-width:20rem;overflow-x:hidden}body{color:#343a40;background:#fff;font-family:sans-serif;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5{font-weight:400}a{text-decoration:none;color:#004ed0}a:visited{color:#8440f1}img{vertical-align:middle}aside nav ul{padding:0;margin:0;list-style:none}aside nav ul li{margin:1em 0}aside nav ul a{display:block}aside nav ul a:hover{opacity:.5}aside nav ul ul{padding-left:1rem}ul.pagination{display:flex;justify-content:center}ul.pagination .page-item a{padding:1rem}.container{max-width:80rem;margin:0 auto}.book-brand{margin-top:0}.book-menu{flex:0 0 16rem;font-size:.875rem}.book-menu nav{width:16rem;padding:1rem;position:fixed;top:0;bottom:0;overflow-x:hidden;overflow-y:auto}.book-menu a{color:#343a40}.book-menu a.active{color:#004ed0}.book-section-flat{margin-bottom:2rem;margin-top:2rem}.book-section-flat>a,.book-section-flat>span{font-weight:600}.book-section-flat>ul{padding-left:0}.book-page{min-width:20rem;flex-grow:1;padding:1rem}.book-header{margin-bottom:1rem;display:none}.book-toc{flex:0 0 14rem;font-size:.75rem}.book-toc nav{width:14rem;padding:1rem;position:fixed;top:0;bottom:0;overflow-x:hidden;overflow-y:auto}.book-toc nav>ul>li:first-child{margin-top:0}.book-footer{display:flex;padding-top:1rem;font-size:.875rem;align-items:baseline}.book-footer img{width:1em;height:1em}.book-posts{min-width:20rem;max-width:41rem;flex-grow:1;padding:1rem}.book-posts article{padding-bottom:1rem}.book-home{padding:1rem}aside nav,.book-page,.book-posts,.markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}@media screen and (max-width:55rem){.book-toc{display:none}}@media screen and (max-width:41rem){.book-menu{margin-left:-16rem}.book-header{display:flex}#menu-control:checked+main .book-menu nav,#menu-control:checked+main .book-page,#menu-control:checked+main .book-posts{transform:translateX(16rem)}#menu-control:checked+main .book-header label{transform:rotate(90deg)}#menu-control:checked+main .markdown{opacity:.25}}@media screen and (min-width:80rem){.book-page,.book-posts,.book-menu nav,.book-toc nav{padding:2rem 1rem}}@font-face{font-family:oxygen;font-style:normal;font-weight:300;font-display:swap;src:url(/fonts/oxygen-v8-latin-300.eot);src:local("Oxygen Light"),local(Oxygen-Light),url(/fonts/oxygen-v8-latin-300.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-300.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-300.woff) format("woff"),url(/fonts/oxygen-v8-latin-300.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-300.svg#Oxygen) format("svg")}@font-face{font-family:oxygen;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/oxygen-v8-latin-regular.eot);src:local("Oxygen Regular"),local(Oxygen-Regular),url(/fonts/oxygen-v8-latin-regular.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-regular.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-regular.woff) format("woff"),url(/fonts/oxygen-v8-latin-regular.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-regular.svg#Oxygen) format("svg")}@font-face{font-family:oxygen;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/oxygen-v8-latin-700.eot);src:local("Oxygen Bold"),local(Oxygen-Bold),url(/fonts/oxygen-v8-latin-700.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-700.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-700.woff) format("woff"),url(/fonts/oxygen-v8-latin-700.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-700.svg#Oxygen) format("svg")}@font-face{font-family:oxygen mono;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/oxygen-mono-v6-latin-regular.eot);src:local("Oxygen Mono"),local(OxygenMono-Regular),url(/fonts/oxygen-mono-v6-latin-regular.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-mono-v6-latin-regular.woff2) format("woff2"),url(/fonts/oxygen-mono-v6-latin-regular.woff) format("woff"),url(/fonts/oxygen-mono-v6-latin-regular.ttf) format("truetype"),url(/fonts/oxygen-mono-v6-latin-regular.svg#OxygenMono) format("svg")}body{font-family:oxygen,sans-serif}
\ No newline at end of file +/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.markdown{line-height:1.7}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5{font-weight:400;line-height:1.25}.markdown>:first-child{margin-top:0;line-height:1}.markdown b,.markdown optgroup,.markdown strong{font-weight:700}.markdown a{text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown code{font-family:oxygen mono,monospace;padding:0 .25rem;background:#f8f9fa;border-radius:.15rem}.markdown pre{padding:1rem;background:#f8f9fa;border-radius:.15rem;font-size:.875rem;overflow-x:auto}.markdown pre code{padding:0;background:0 0}.markdown blockquote{border-left:2px solid #dee2e6;margin:0;padding:1px 1rem}.markdown blockquote :first-child{margin-top:0}.markdown blockquote :last-child{margin-bottom:0}.markdown table{border-spacing:0;border-collapse:collapse}.markdown table tr th,.markdown table tr td{padding:.5rem 1rem;line-height:1;border:1px solid #e9ecef}.markdown table tr:nth-child(2n){background:#f8f9fa}.markdown hr{height:1px;border:none;background:#e9ecef}.markdown-inner>:first-child{margin-top:0}.markdown-inner>:last-child{margin-bottom:0}.book-expand{border:1px solid #e9ecef}.book-expand .book-expand-head{background:#f8f9fa;padding:.5rem 1rem;cursor:pointer}.book-expand .book-expand-content{display:none;padding:1rem}.book-expand input[type=checkbox]:checked+.book-expand-content{display:block}.book-tabs{border:1px solid #e9ecef;display:flex;flex-wrap:wrap}.book-tabs label{display:inline-block;padding:.5rem 1rem;border-bottom:1px transparent;cursor:pointer}.book-tabs .book-tabs-content{order:999;width:100%;border-top:1px solid #f8f9fa;padding:1rem;display:none}.book-tabs input[type=radio]:checked+label{border-bottom:1px solid #004ed0}.book-tabs input[type=radio]:checked+label+.book-tabs-content{display:block}.book-columns>div{max-width:50%}.book-columns>div+div{margin-left:2rem}.flex{display:flex}.flex-auto{flex:1 1 auto}.flex-even{flex:1 1}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.align-center{align-items:center}.mx-auto{margin:0 auto}html{font-size:16px;letter-spacing:.33px;scroll-behavior:smooth}html,body{min-width:20rem;overflow-x:hidden}body{color:#343a40;background:#fff;font-family:sans-serif;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5{font-weight:400}a{text-decoration:none;color:#004ed0}a:visited{color:#8440f1}img{vertical-align:middle}aside nav ul{padding:0;margin:0;list-style:none}aside nav ul li{margin:1em 0}aside nav ul a{display:block}aside nav ul a:hover{opacity:.5}aside nav ul ul{padding-left:1rem}ul.pagination{display:flex;justify-content:center}ul.pagination .page-item a{padding:1rem}.container{max-width:80rem;margin:0 auto}.book-brand{margin-top:0}.book-menu{flex:0 0 16rem;font-size:.875rem}.book-menu nav{width:16rem;padding:1rem;position:fixed;top:0;bottom:0;overflow-x:hidden;overflow-y:auto}.book-menu a{color:#343a40}.book-menu a.active{color:#004ed0}.book-section-flat{margin-bottom:2rem;margin-top:2rem}.book-section-flat>a,.book-section-flat>span{font-weight:600}.book-section-flat>ul{padding-left:0}.book-page{min-width:20rem;flex-grow:1;padding:1rem}.book-header{margin-bottom:1rem;display:none}.book-toc{flex:0 0 14rem;font-size:.75rem}.book-toc nav{width:14rem;padding:1rem;position:fixed;top:0;bottom:0;overflow-x:hidden;overflow-y:auto}.book-toc nav>ul>li:first-child{margin-top:0}.book-toc.level-1 ul ul,.book-toc.level-2 ul ul ul,.book-toc.level-3 ul ul ul ul,.book-toc.level-4 ul ul ul ul ul,.book-toc.level-5 ul ul ul ul ul ul,.book-toc.level-6 ul ul ul ul ul ul ul{display:none}.book-footer{display:flex;padding-top:1rem;font-size:.875rem;align-items:baseline}.book-footer img{width:1em;height:1em}.book-posts{min-width:20rem;max-width:41rem;flex-grow:1;padding:1rem}.book-posts article{padding-bottom:1rem}.book-home{padding:1rem}aside nav,.book-page,.book-posts,.markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}@media screen and (max-width:55rem){.book-toc{display:none}}@media screen and (max-width:41rem){.book-menu{margin-left:-16rem}.book-header{display:flex}#menu-control:checked+main .book-menu nav,#menu-control:checked+main .book-page,#menu-control:checked+main .book-posts{transform:translateX(16rem)}#menu-control:checked+main .book-header label{transform:rotate(90deg)}#menu-control:checked+main .markdown{opacity:.25}}@media screen and (min-width:80rem){.book-page,.book-posts,.book-menu nav,.book-toc nav{padding:2rem 1rem}}@font-face{font-family:oxygen;font-style:normal;font-weight:300;font-display:swap;src:url(/fonts/oxygen-v8-latin-300.eot);src:local("Oxygen Light"),local(Oxygen-Light),url(/fonts/oxygen-v8-latin-300.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-300.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-300.woff) format("woff"),url(/fonts/oxygen-v8-latin-300.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-300.svg#Oxygen) format("svg")}@font-face{font-family:oxygen;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/oxygen-v8-latin-regular.eot);src:local("Oxygen Regular"),local(Oxygen-Regular),url(/fonts/oxygen-v8-latin-regular.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-regular.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-regular.woff) format("woff"),url(/fonts/oxygen-v8-latin-regular.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-regular.svg#Oxygen) format("svg")}@font-face{font-family:oxygen;font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/oxygen-v8-latin-700.eot);src:local("Oxygen Bold"),local(Oxygen-Bold),url(/fonts/oxygen-v8-latin-700.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-v8-latin-700.woff2) format("woff2"),url(/fonts/oxygen-v8-latin-700.woff) format("woff"),url(/fonts/oxygen-v8-latin-700.ttf) format("truetype"),url(/fonts/oxygen-v8-latin-700.svg#Oxygen) format("svg")}@font-face{font-family:oxygen mono;font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/oxygen-mono-v6-latin-regular.eot);src:local("Oxygen Mono"),local(OxygenMono-Regular),url(/fonts/oxygen-mono-v6-latin-regular.eot?#iefix) format("embedded-opentype"),url(/fonts/oxygen-mono-v6-latin-regular.woff2) format("woff2"),url(/fonts/oxygen-mono-v6-latin-regular.woff) format("woff"),url(/fonts/oxygen-mono-v6-latin-regular.ttf) format("truetype"),url(/fonts/oxygen-mono-v6-latin-regular.svg#OxygenMono) format("svg")}body{font-family:oxygen,sans-serif}
\ No newline at end of file diff --git a/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.json b/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.json index b222e29..933eb80 100644 --- a/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.json +++ b/exampleSite/resources/_gen/assets/scss/book.scss_48b060fe05b0a273d182ef83c0605941.json @@ -1 +1 @@ -{"Target":"book.min.1009ab9f4daf8375016f8f76fc100311154512dbc6cc21faa1282132e83dad16.css","MediaType":"text/css","Data":{"Integrity":"sha256-EAmrn02vg3UBb492/BADERVFEtvGzCH6oSghMug9rRY="}}
\ No newline at end of file +{"Target":"book.min.3c69b4506bc4a8da260ab28ed0c14019a49435aed9fd20517f353987fa0f60ec.css","MediaType":"text/css","Data":{"Integrity":"sha256-PGm0UGvEqNomCrKO0MFAGaSUNa7Z/SBRfzU5h/oPYOw="}}
\ No newline at end of file diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html index 4f4cb0c..9ed63ea 100644 --- a/layouts/partials/docs/menu-filetree.html +++ b/layouts/partials/docs/menu-filetree.html @@ -23,7 +23,7 @@ {{ define "book-section" }} {{ with .Section }} - <li {{ if .Params.bookFlatSection}} class="book-section-flat" {{ end }}> + <li {{ if .Params.BookFlatSection}} class="book-section-flat" {{ end }}> {{ if .Content }} {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} {{ else }} diff --git a/layouts/partials/docs/menu.html b/layouts/partials/docs/menu.html index 238f976..d280713 100644 --- a/layouts/partials/docs/menu.html +++ b/layouts/partials/docs/menu.html @@ -1,4 +1,4 @@ -<nav role="navigation"> +<nav> {{ partial "docs/brand" . }} {{ partial "docs/inject/menu-before" . }} diff --git a/layouts/partials/docs/toc.html b/layouts/partials/docs/toc.html index 83c276d..c81341c 100644 --- a/layouts/partials/docs/toc.html +++ b/layouts/partials/docs/toc.html @@ -1,6 +1,6 @@ -{{ $showToC := default (default true .Site.Params.BookShowToC) .Params.bookshowtoc }} - {{ if and ($showToC) (.Page.TableOfContents) }} - <aside class="book-toc fixed"> +{{ $tocLevels := default (default 6 .Site.Params.BookToC) .Params.BookToC }} +{{ if and $tocLevels .Page.TableOfContents }} + <aside class="book-toc level-{{$tocLevels}} fixed"> {{ .Page.TableOfContents }} </aside> {{ end }} |