aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/en/methods/page/Slug.md
blob: 9fdb09b5774071416beab3733f5a456bb4d4d80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
title: Slug
description: Returns the URL slug of the given page as defined in front matter.
categories: []
keywords: []
action:
  related: []
  returnType: string
  signatures: [PAGE.Slug]
---

{{< code-toggle file=content/recipes/spicy-tuna-hand-rolls.md fm=true >}}
title = 'How to make spicy tuna hand rolls'
slug = 'sushi'
{{< /code-toggle >}}

This page will be served from:

    https://example.org/recipes/sushi

To get the slug value within a template:

```go-html-template
{{ .Slug }} → sushi
```