Skip to content

Commit

Permalink
Document slug front matter
Browse files Browse the repository at this point in the history
Closes #391.

Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Jan 31, 2024
1 parent c2aa072 commit 980fca1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/sources/write/front-matter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ cascade:

Use `menuTitle` to specify a different heading in the sidebar navigation than the `title` element; for example, if you want to abbreviate the topic heading in the table of contents.

### Slug

The `slug` front matter overrides the last segment of the URL path.
It's ineffective on `_index.md` files, also known as section pages, or branch bundles.
For more information, refer to [Slug](https://gohugo.io/content-management/urls/#slug).

You should prefer to update the filename instead of using the `slug` front matter because it makes it easier to find the correct source file for a URL.

### Title (required)

Hugo uses the `title` to generate the sidebar table of contents if there is no `menuTitle` specified in the front matter. If the `doc-validator` linter has been implemented on your repository, your topic heading must exactly match the title in the metadata.
Expand Down

0 comments on commit 980fca1

Please sign in to comment.