Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document slug front matter #446

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 which are 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
Loading