Skip to content

Commit 380102c

Browse files
committed
Updated tags documentation
1 parent f3047b0 commit 380102c

6 files changed

+56
-13
lines changed

docs/deprecations.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ The `redirect` key, which could be added via [Metadata][1], allowed to
1919
specify a redirect from within a document to a new address, which is a good
2020
idea when moving content around:
2121

22-
``` markdown
22+
``` bash
2323
---
2424
redirect: /path/to/new/file
2525
---
26+
27+
# Document title
28+
...
2629
```
2730

2831
The [redirects][2] plugin provides the ability to define redirect mappings via
@@ -54,11 +57,14 @@ The `source` and `path` keys, which could be added via [Metadata][1], showed
5457
a source icon at the top right corner of a document, linking a document to a
5558
single source file:
5659

57-
``` markdown
60+
``` bash
5861
---
5962
path: tree/master/docs
6063
source: deprecations.md
6164
---
65+
66+
# Document title
67+
...
6268
```
6369

6470
Only a single source file could be linked, which is useless if a document refers
@@ -84,10 +90,13 @@ The `hero` key, which could be added via [Metadata][1], allowed to render a
8490
simple, text-only and page-local teaser text as part of a document. It could
8591
be set from front matter with:
8692

87-
``` markdown
93+
``` bash
8894
---
8995
hero: Lorem ipsum dolor sit amet
9096
---
97+
98+
# Document title
99+
...
91100
```
92101

93102
The recommended way is to [override the `hero` block][5] via [theme
@@ -96,10 +105,13 @@ templates can be shared among multiple pages:
96105

97106
=== "Markdown"
98107

99-
``` markdown
108+
``` bash
100109
---
101110
template: hero.html
102111
---
112+
113+
# Document title
114+
...
103115
```
104116

105117
=== "Template"

docs/reference/meta-tags.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ Markdown document, delimited by a blank line which ends the YAML context.
3838
If the [Metadata][5] extension is enabled, the page title can be overridden on
3939
a per-document basis with custom front matter:
4040
41-
``` markdown
41+
``` bash
4242
---
4343
title: Lorem ipsum dolor sit amet
4444
---
45+
46+
# Document title
47+
...
4548
```
4649

4750
This will set the `title` tag inside the document `head` for the current page
@@ -55,10 +58,13 @@ separator, which is the default behavior.
5558
If the [Metadata][5] extension is enabled, the page description can also be
5659
overridden on a per-document basis with custom front matter:
5760

58-
``` markdown
61+
``` bash
5962
---
6063
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
6164
---
65+
66+
# Document title
67+
...
6268
```
6369

6470
This will set the `meta` tag containing the site description inside the

docs/setup/adding-a-comment-system.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,23 @@ specific pages by adding the following to the front matter of a page:
4646
4747
=== "Enable Disqus"
4848
49-
``` yaml
49+
``` bash
5050
---
5151
disqus: <shortname>
5252
---
5353

54+
# Document title
5455
...
5556
```
5657

5758
=== "Disable Disqus"
5859

59-
``` yaml
60+
``` bash
6061
---
6162
disqus: ""
6263
---
6364
65+
# Document title
6466
...
6567
```
6668

docs/setup/setting-up-navigation.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,14 @@ Sometimes it's desirable to hide the navigation and/or table of contents
388388
sidebar, especially when there's a single navigation item. This can be done for
389389
any page using the [Metadata][29] extension:
390390

391-
``` yaml
391+
``` bash
392392
---
393393
hide:
394-
- navigation # Hide navigation
395-
- toc # Hide table of contents
394+
- navigation
395+
- toc
396396
---
397397
398+
# Document title
398399
...
399400
```
400401

docs/setup/setting-up-site-search.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,13 @@ In order to give specific pages a higher relevance in search, [lunr][4] supports
273273
page-specific boosts, which can be defined for each page by leveraging the
274274
[Metadata][19] extension:
275275

276-
``` yaml
276+
``` bash
277277
---
278278
search:
279279
boost: 100
280280
---
281281
282+
# Document title
282283
...
283284
```
284285

docs/setup/setting-up-tags.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tags:
8686
...
8787
```
8888

89-
The page will now render with those tags below the main headline and within the
89+
The page will now render with those tags above the main headline and within the
9090
search preview, which now allows to __find pages by tags__, as shown in the
9191
following screenshots:
9292

@@ -125,3 +125,24 @@ arbitrary content before and after the marker:
125125

126126
[8]: #tags_file
127127
[9]: ../assets/screenshots/tags-index.png
128+
129+
### Hiding the tags
130+
131+
[:octicons-file-code-24: Source][1] ·
132+
:octicons-note-24: Metadata
133+
134+
While the tags are rendered above the main headline, sometimes, it might be
135+
desirable to hide them for a specific page, which can be achieved by using the
136+
[Metadata][10] extension:
137+
138+
``` bash
139+
---
140+
hide:
141+
- tags
142+
---
143+
144+
# Document title
145+
...
146+
```
147+
148+
[10]: ../../reference/meta-tags/#metadata

0 commit comments

Comments
 (0)