diff --git a/docs/docs/template.md b/docs/docs/template.md index cb63d7a75a1..f727b80b193 100644 --- a/docs/docs/template.md +++ b/docs/docs/template.md @@ -40,6 +40,10 @@ Name | Type | Description `_gitContribute` | object | Defines the `repo` and `branch` property of git links. `_gitUrlPattern` | string | URL pattern of git links. `_disableNewTab` | bool | Whether to render external link indicator icons and open external links in a new tab. +`_disableNavbar` | bool | Whether to show the navigation bar. +`_disableBreadcrumb` | bool | Whether to show the breadcrumb. +`_disableToc` | bool | Whether to show the TOC. +`_disableAffix` | bool | Whether to show the right rail. `_disableNextArticle` | bool | Whether to show the previous and next article link. `_disableTocFilter` | bool | Whether to show the table of content filter box. `_googleAnalyticsTagId` | string | Enables Google Analytics web traffic analysis. diff --git a/templates/modern/layout/_master.tmpl b/templates/modern/layout/_master.tmpl index 371f5720d99..e82da41f165 100644 --- a/templates/modern/layout/_master.tmpl +++ b/templates/modern/layout/_master.tmpl @@ -60,6 +60,7 @@
+ {{^_disableNavbar}} + {{/_disableNavbar}}
+ {{^_disableToc}}
@@ -95,16 +98,21 @@
+ {{/_disableToc}}
+ {{^_disableToc}} + {{/_disableToc}} + {{^_disableBreadcrumb}} + {{/_disableBreadcrumb}}
@@ -128,9 +136,11 @@
+ {{^_disableAffix}}
+ {{/_disableAffix}}
{{#_enableSearch}} diff --git a/templates/modern/src/layout.scss b/templates/modern/src/layout.scss index b53e4896f11..1374bf3f654 100644 --- a/templates/modern/src/layout.scss +++ b/templates/modern/src/layout.scss @@ -161,7 +161,6 @@ body[data-layout="landing"] { display: flex; align-items: flex-start; margin-top: .5rem; - min-height: 40px; } article { diff --git a/templates/modern/src/nav.ts b/templates/modern/src/nav.ts index 078f1d4ca35..9660b0a5534 100644 --- a/templates/modern/src/nav.ts +++ b/templates/modern/src/nav.ts @@ -23,7 +23,7 @@ export type NavItemContainer = { export async function renderNavbar(): Promise { const navbar = document.getElementById('navbar') if (!navbar) { - return + return [] } const { iconLinks } = await options()