Skip to content

Commit e96b5ce

Browse files
author
Misty Stanley-Jones
committed
Add info about front-matter to README
1 parent 0d63979 commit e96b5ce

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

README.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,23 @@ You have three options:
136136
docker-compose down
137137
```
138138
139-
2. Use Jekyll directly.
139+
2. Use Jekyll directly.
140140
141141
a. Clone this repo by running:
142142
143143
```bash
144144
git clone https://github.com/docker/docker.github.io.git
145145
```
146-
146+
147147
b. Install Ruby 2.3 or later as described in [Installing Ruby]
148148
(https://www.ruby-lang.org/en/documentation/installation/).
149-
149+
150150
c. Install Bundler:
151151
152152
```bash
153153
gem install bundler
154154
```
155-
155+
156156
d. If you use Ubuntu, install packages required for the Nokogiri HTML
157157
parser:
158158
@@ -165,7 +165,7 @@ You have three options:
165165
```bash
166166
bundle install
167167
```
168-
168+
169169
>**Note**: You may have to install some packages manually.
170170
171171
f. Change the directory to `docker.github.io`.
@@ -203,12 +203,43 @@ guidance about grammar, syntax, formatting, styling, language, or tone. If
203203
something isn't clear in the guide, please submit an issue to let us know or
204204
submit a pull request to help us improve it.
205205
206-
### Generate the man pages
207-
208-
For information on generating man pages (short for manual page), see the README.md
209-
document in [the man page directory](https://github.com/docker/docker/tree/master/man)
210-
in this project.
206+
### Per-page front-matter
207+
208+
The front-matter of a given page is in a section at the top of the Markdown
209+
file that starts and ends with three hyphens. It includes YAML content. The
210+
following keys are supported. The title, description, and keywords are required.
211+
212+
| Key | Required | Description |
213+
|------------------------|-----------|-----------------------------------------|
214+
| title | yes | The page title. This is added to the HTML output as a `<h1>` level header. |
215+
| description | yes | A sentence that describes the page contents. This is added to the HTML metadata. |
216+
| keywords | yes | A comma-separated list of keywords. These are added to the HTML metadata. |
217+
| redirect_from | no | A YAML list of pages which should redirect to THIS page. At build time, each page listed here is created as a HTML stub containing a 302 redirect to this page. |
218+
| 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.|
219+
| 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. |
220+
| 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. |
221+
| tree | no | Either `true` or `false`. Set to `false` to disable the left-hand site-wide navigation for this page. Appropriate for some pages like the search page or the 404 page. |
222+
| no_ratings | no | Either `true` or `false`. Set to `true` to disable the page-ratings applet for this page. Defaults to `false`. |
223+
224+
The following is an example of valid (but contrived) page metadata. The order of
225+
the metadata elements in the front-matter is not important.
226+
227+
```liquid
228+
---
229+
description: Instructions for installing Docker on Ubuntu
230+
keywords: requirements, apt, installation, ubuntu, install, uninstall, upgrade, update
231+
redirect_from:
232+
- /engine/installation/ubuntulinux/
233+
- /installation/ubuntulinux/
234+
- /engine/installation/linux/ubuntulinux/
235+
title: Get Docker for Ubuntu
236+
toc_min: 1
237+
toc_max: 6
238+
tree: false
239+
no_ratings: true
240+
---
241+
```
211242
212243
## Copyright and license
213244
214-
Code and documentation copyright 2016 Docker, inc, released under the Apache 2.0 license.
245+
Code and documentation copyright 2017 Docker, inc, released under the Apache 2.0 license.

0 commit comments

Comments
 (0)