Skip to content

Commit

Permalink
Docs: Fix YAML syntax in examples
Browse files Browse the repository at this point in the history
* Fix indentation
* Quote strings
  • Loading branch information
pixelbrackets authored and waylan committed Aug 13, 2019
1 parent 625e423 commit f200a60
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
20 changes: 9 additions & 11 deletions docs/user-guide/configuration.md
Expand Up @@ -165,14 +165,12 @@ This option can be overridden by a command line option in `gh-deploy`.
### nav

This setting is used to determine the format and layout of the global navigation
for the site. For example, the following would create "Introduction", "User
Guide" and "About" navigation items.
for the site. A minimal navigation configuration could look like this:

```yaml
nav:
- 'Introduction': 'index.md'
- 'User Guide': 'user-guide.md'
- 'About': 'about.md'
- 'index.md'
- 'about.md'
```

All paths must be relative to the `mkdocs.yml` configuration file. See the
Expand All @@ -187,9 +185,9 @@ how MkDocs determines the page title of a document.

```yaml
nav:
- Home: index.md
- User Guide: user-guide.md
- Bug Tracker: https://example.com/
- Introduction: 'index.md'
- 'about.md'
- 'Issue Tracker': 'https://example.com/'
```

In the above example, the first two items point to local files while the third
Expand All @@ -203,9 +201,9 @@ the full domain. In that case, you may use and appropriate relative URL.
site_url: https://example.com/foo/

nav:
- Home: ../
- User Guide: user-guide.md
- Bug Tracker: /bugs/
- Home: '../'
- 'User Guide': 'user-guide.md'
- 'Bug Tracker': '/bugs/'
```

In the above example, two different styles of external links are used. First
Expand Down
24 changes: 12 additions & 12 deletions docs/user-guide/writing-your-docs.md
Expand Up @@ -97,12 +97,12 @@ navigation configuration will always be sorted alphanumerically by file name
will need to manually define your navigation configuration if you would like
your navigation menu sorted differently.

A simple navigation configuration looks like this:
A minimal navigation configuration could look like this:

```no-highlight
nav:
- 'index.md'
- 'about.md'
- 'index.md'
- 'about.md'
```

All paths in the navigation configuration must be relative to the `docs_dir`
Expand All @@ -117,8 +117,8 @@ in the `nav` setting add a title right before the filename.

```no-highlight
nav:
- Home: 'index.md'
- About: 'about.md'
- Home: 'index.md'
- About: 'about.md'
```

Note that if a title is defined for a page in the navigation, that title will be
Expand All @@ -130,13 +130,13 @@ section title. For example:

```no-highlight
nav:
- Home: 'index.md'
- User Guide:
- 'Writing your docs': 'writing-your-docs.md'
- 'Styling your docs': 'styling-your-docs.md'
- About:
- 'License': 'license.md'
- 'Release Notes': 'release-notes.md'
- Home: 'index.md'
- 'User Guide':
- 'Writing your docs': 'writing-your-docs.md'
- 'Styling your docs': 'styling-your-docs.md'
- About:
- 'License': 'license.md'
- 'Release Notes': 'release-notes.md'
```

With the above configuration we have three top level items: "Home", "User Guide"
Expand Down

0 comments on commit f200a60

Please sign in to comment.