Skip to content

Commit 21b37d3

Browse files
authored
Merge pull request #20846 from dvdksn/hugo-templates-tidy
chore: tidy up hugo templates
2 parents 50e986c + edc85be commit 21b37d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+179
-201
lines changed

content/contribute/file-conventions.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ The front matter of a given page is in a section at the top of the Markdown
1919
file that starts and ends with three hyphens. It includes YAML content. The
2020
following keys are supported. The title, description, and keywords are required.
2121

22-
| Key | Required | Description |
23-
|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
24-
| title | yes | The page title. This is added to the HTML output as a `<h1>` level header. |
25-
| description | yes | A sentence that describes the page contents. This is added to the HTML metadata. It’s not rendered on the page. |
26-
| keywords | yes | A comma-separated list of keywords. These are added to the HTML metadata. |
27-
| aliases | no | A YAML list of pages which should redirect to the current page. At build time, each page listed here is created as an HTML stub containing a 302 redirect to this page. |
28-
| notoc | no | Either `true` or `false`. If `true`, no in-page TOC is generated for the HTML output of this page. Defaults to `false`. Appropriate for some landing pages that have no in-page headings. |
29-
| toc_min | no | Ignored if `notoc` is set to `true`. The minimum heading level included in the in-page TOC. Defaults to `2`, to show `<h2>` headings as the minimum. |
30-
| toc_max | no | Ignored if `notoc` is set to `false`. The maximum heading level included in the in-page TOC. Defaults to `3`, to show `<h3>` headings. Set to the same as `toc_min` to only show `toc_min` level of headings. |
31-
| sitemap | no | Exclude the page from indexing by search engines. When set to `false`, the page is excluded from `sitemap.xml`, and a `<meta name="robots" content="noindex"/>` header is added to the page. |
22+
| Key | Required | Description |
23+
|-----------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
24+
| title | yes | The page title. This is added to the HTML output as a `<h1>` level header. |
25+
| description | yes | A sentence that describes the page contents. This is added to the HTML metadata. It’s not rendered on the page. |
26+
| keywords | yes | A comma-separated list of keywords. These are added to the HTML metadata. |
27+
| aliases | no | A YAML list of pages which should redirect to the current page. At build time, each page listed here is created as an HTML stub containing a 302 redirect to this page. |
28+
| notoc | no | Either `true` or `false`. If `true`, no in-page TOC is generated for the HTML output of this page. Defaults to `false`. Appropriate for some landing pages that have no in-page headings. |
29+
| toc_min | no | Ignored if `notoc` is set to `true`. The minimum heading level included in the in-page TOC. Defaults to `2`, to show `<h2>` headings as the minimum. |
30+
| toc_max | no | Ignored if `notoc` is set to `false`. The maximum heading level included in the in-page TOC. Defaults to `3`, to show `<h3>` headings. Set to the same as `toc_min` to only show `toc_min` level of headings. |
31+
| sitemap | no | Exclude the page from indexing by search engines. When set to `false`, the page is excluded from `sitemap.xml`, and a `<meta name="robots" content="noindex"/>` header is added to the page. |
32+
| sidebar.reverse | no | This parameter for section pages changes the sort order of the pages in that section. Pages that would normally appear at the top, by weight or by title, will instead appear near the bottom, and vice versa. |
33+
| sidebar.goto | no | Set this to change the URL that the sidebar should point to for this entry. See [pageless sidebar entries](#pageless-sidebar-entries). |
3234

3335
Here's an example of a valid (but contrived) page metadata. The order of
3436
the metadata elements in the front matter isn't important.
@@ -60,3 +62,19 @@ The body of the page (with the exception of keywords) starts after the front mat
6062
### Text length
6163

6264
Splitting long lines (preferably up to 80 characters) can make it easier to provide feedback on small chunks of text.
65+
66+
## Pageless sidebar entries
67+
68+
If you want to add an entry to the sidebar, but you want the link to point somewhere else, you can use the `sidebar.goto` parameter.
69+
This is useful in combination with `build.render` set to `always`, which creates a pageless entry in the sidebar that links to another page.
70+
71+
```md
72+
---
73+
title: Dummy sidebar link
74+
build:
75+
render: never
76+
sidebar:
77+
goto: /some/other/page/
78+
weight: 30
79+
---
80+
```

content/learning-paths/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: Learning paths
3+
cascade:
4+
layout: wide
35
description: |
46
Docker Learning Paths offer structured guides to help you master Docker.
57
keywords: docker, learning, paths, tutorials, resources
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
build:
3+
render: never
4+
title: Latest (v{{< param latest_engine_api_version >}})
5+
params:
6+
sidebar:
7+
goto: "/reference/api/engine/version/v{{< param latest_engine_api_version >}}"
8+
weight: 20
9+
---

content/reference/api/engine/latest/index.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

content/reference/api/engine/version/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ build:
44
render: never
55
sidebar:
66
reverse: true
7+
cascade:
8+
description: Reference documentation and Swagger (OpenAPI) specification for the Docker Engine API.
9+
layout: api
710
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: v1.25
3-
layout: engine-api
2+
title: Docker Engine API v1.25 reference
3+
linkTitle: v1.25
44
aliases:
55
- /engine/api/v1.25/
66
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: v1.26
3-
layout: engine-api
2+
linkTitle: v1.26
3+
title: Docker Engine API v1.26 reference
44
aliases:
55
- /engine/api/v1.26/
66
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: v1.27
3-
layout: engine-api
2+
linkTitle: v1.27
3+
title: Docker Engine API v1.27 reference
44
aliases:
55
- /engine/api/v1.27/
66
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: v1.28
3-
layout: engine-api
2+
linkTitle: v1.28
3+
title: Docker Engine API v1.28 reference
44
aliases:
55
- /engine/api/v1.28/
66
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: v1.29
3-
layout: engine-api
2+
linkTitle: v1.29
3+
title: Docker Engine API v1.29 reference
44
aliases:
55
- /engine/api/v1.29/
66
---

0 commit comments

Comments
 (0)