#43, Add bookHidden page param to hide page from side menu
This commit is contained in:
parent
5b963180ab
commit
ffd5e272a8
7 changed files with 66 additions and 15 deletions
19
README.md
19
README.md
|
@ -149,7 +149,10 @@ weight: 10
|
||||||
# (Optional) Set to mark page as flat section in file-tree menu (if BookMenuBundle not set)
|
# (Optional) Set to mark page as flat section in file-tree menu (if BookMenuBundle not set)
|
||||||
bookFlatSection: true
|
bookFlatSection: true
|
||||||
|
|
||||||
# (Optional) Set to hide table of contents, overrides global value
|
# (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
|
bookShowToC: false
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
@ -158,13 +161,13 @@ bookShowToC: false
|
||||||
### Partials
|
### Partials
|
||||||
There are few empty partials you can override in `layouts/partials/`
|
There are few empty partials you can override in `layouts/partials/`
|
||||||
|
|
||||||
| Partial | Placement |
|
| Partial | Placement |
|
||||||
| -- | -- |
|
| -- | -- |
|
||||||
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
|
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
|
||||||
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
|
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
|
||||||
| `layouts/partials/docs/inject/footer.html` | Before closing `<body>` tag |
|
| `layouts/partials/docs/inject/footer.html` | After page content |
|
||||||
| `layouts/partials/docs/inject/menu-before.html` | At the beginning of `<nav>` menu block |
|
| `layouts/partials/docs/inject/menu-before.html` | At the beginning of `<nav>` menu block |
|
||||||
| `layouts/partials/docs/inject/menu-after.html` | At the end of `<nav>` menu block |
|
| `layouts/partials/docs/inject/menu-after.html` | At the end of `<nav>` menu block |
|
||||||
|
|
||||||
|
|
||||||
### Extra Customization
|
### Extra Customization
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
weight: 1
|
|
||||||
bookFlatSection: true
|
|
||||||
---
|
|
52
exampleSite/content/docs/hidden.md
Normal file
52
exampleSite/content/docs/hidden.md
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
---
|
||||||
|
bookHidden: true
|
||||||
|
---
|
||||||
|
|
||||||
|
# This page is hidden in menu
|
||||||
|
|
||||||
|
# Quondam non pater est dignior ille Eurotas
|
||||||
|
|
||||||
|
## Latent te facies
|
||||||
|
|
||||||
|
Lorem markdownum arma ignoscas vocavit quoque ille texit mandata mentis ultimus,
|
||||||
|
frementes, qui in vel. Hippotades Peleus [pennas
|
||||||
|
conscia](http://gratia.net/tot-qua.php) cuiquam Caeneus quas.
|
||||||
|
|
||||||
|
- Pater demittere evincitque reddunt
|
||||||
|
- Maxime adhuc pressit huc Danaas quid freta
|
||||||
|
- Soror ego
|
||||||
|
- Luctus linguam saxa ultroque prior Tatiumque inquit
|
||||||
|
- Saepe liquitur subita superata dederat Anius sudor
|
||||||
|
|
||||||
|
## Cum honorum Latona
|
||||||
|
|
||||||
|
O fallor [in sustinui
|
||||||
|
iussorum](http://www.spectataharundine.org/aquas-relinquit.html) equidem.
|
||||||
|
Nymphae operi oris alii fronde parens dumque, in auro ait mox ingenti proxima
|
||||||
|
iamdudum maius?
|
||||||
|
|
||||||
|
reality(burnDocking(apache_nanometer),
|
||||||
|
pad.property_data_programming.sectorBrowserPpga(dataMask, 37,
|
||||||
|
recycleRup));
|
||||||
|
intellectualVaporwareUser += -5 * 4;
|
||||||
|
traceroute_key_upnp /= lag_optical(android.smb(thyristorTftp));
|
||||||
|
surge_host_golden = mca_compact_device(dual_dpi_opengl, 33,
|
||||||
|
commerce_add_ppc);
|
||||||
|
if (lun_ipv) {
|
||||||
|
verticalExtranet(1, thumbnail_ttl, 3);
|
||||||
|
bar_graphics_jpeg(chipset - sector_xmp_beta);
|
||||||
|
}
|
||||||
|
|
||||||
|
## Fronde cetera dextrae sequens pennis voce muneris
|
||||||
|
|
||||||
|
Acta cretus diem restet utque; move integer, oscula non inspirat, noctisque
|
||||||
|
scelus! Nantemque in suas vobis quamvis, et labori!
|
||||||
|
|
||||||
|
var runtimeDiskCompiler = home - array_ad_software;
|
||||||
|
if (internic > disk) {
|
||||||
|
emoticonLockCron += 37 + bps - 4;
|
||||||
|
wan_ansi_honeypot.cardGigaflops = artificialStorageCgi;
|
||||||
|
simplex -= downloadAccess;
|
||||||
|
}
|
||||||
|
var volumeHardeningAndroid = pixel + tftp + onProcessorUnmount;
|
||||||
|
sector(memory(firewire + interlaced, wired));
|
|
@ -15,7 +15,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range $sections }}
|
{{ range where $sections "Params.bookhidden" "!=" true }}
|
||||||
{{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }}
|
{{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -38,10 +38,10 @@
|
||||||
{{ define "book-section-children" }}
|
{{ define "book-section-children" }}
|
||||||
{{ with .Section }}
|
{{ with .Section }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Sections }}
|
{{ range where .Sections "Params.bookhidden" "!=" true }}
|
||||||
{{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
|
{{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range .Pages }}
|
{{ range where .Pages "Params.bookhidden" "!=" true }}
|
||||||
<li>
|
<li>
|
||||||
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
|
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue