summaryrefslogtreecommitdiffstats
path: root/docs/content/en/content-management/urls.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/content-management/urls.md')
-rw-r--r--docs/content/en/content-management/urls.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md
index ae58a6277..25bd09165 100644
--- a/docs/content/en/content-management/urls.md
+++ b/docs/content/en/content-management/urls.md
@@ -27,16 +27,16 @@ The `permalinks` option in your [site configuration][config] allows you to adjus
These examples use the default values for `publishDir` and `contentDir`; i.e., `public` and `content`, respectively. You can override the default values in your [site's `config` file](/getting-started/configuration/).
{{% /note %}}
-For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
+For example, if one of your [sections][] is called `posts` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
### Permalinks Configuration Example
{{< code-toggle file="config" copy="false" >}}
permalinks:
- post: /:year/:month/:title/
+ posts: /:year/:month/:title/
{{< /code-toggle >}}
-Only the content under `post/` will have the new URL structure. For example, the file `content/post/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.
+Only the content under `posts/` will have the new URL structure. For example, the file `content/posts/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.
You can also configure permalinks of taxonomies with the same syntax, by using the plural form of the taxonomy instead of the section. You will probably only want to use the configuration values `:slug` or `:title`.
@@ -156,7 +156,7 @@ Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias
The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name="robots" content="noindex">` lets search engine bots know that they should not crawl and index your new alias page.
-### Customize
+### Customize
You may customize this alias page by creating an `alias.html` template in the
layouts folder of your site (i.e., `layouts/alias.html`). In this case, the data passed to the template is
@@ -199,11 +199,11 @@ See [Content Organization][contentorg] for more details on paths.
└── content
└── about
| └── _index.md // <- https://example.com/about/
- ├── post
- | ├── firstpost.md // <- https://example.com/post/firstpost/
+ ├── posts
+ | ├── firstpost.md // <- https://example.com/posts/firstpost/
| ├── happy
- | | └── ness.md // <- https://example.com/post/happy/ness/
- | └── secondpost.md // <- https://example.com/post/secondpost/
+ | | └── ness.md // <- https://example.com/posts/happy/ness/
+ | └── secondpost.md // <- https://example.com/posts/secondpost/
└── quote
├── first.md // <- https://example.com/quote/first/
└── second.md // <- https://example.com/quote/second/
@@ -216,11 +216,11 @@ Here's the same organization run with `hugo --uglyURLs`:
└── content
└── about
| └── _index.md // <- https://example.com/about.html
- ├── post
- | ├── firstpost.md // <- https://example.com/post/firstpost.html
+ ├── posts
+ | ├── firstpost.md // <- https://example.com/posts/firstpost.html
| ├── happy
- | | └── ness.md // <- https://example.com/post/happy/ness.html
- | └── secondpost.md // <- https://example.com/post/secondpost.html
+ | | └── ness.md // <- https://example.com/posts/happy/ness.html
+ | └── secondpost.md // <- https://example.com/posts/secondpost.html
└── quote
├── first.md // <- https://example.com/quote/first.html
└── second.md // <- https://example.com/quote/second.html
@@ -265,7 +265,7 @@ By default, all relative URLs are left unchanged by Hugo, which can be problemat
Setting `relativeURLs` to `true` in your [site configuration][config] will cause Hugo to rewrite all relative URLs to be relative to the current content.
-For example, if your `/post/first/` page contains a link to `/about/`, Hugo will rewrite the URL to `../../about/`.
+For example, if your `/posts/first/` page contains a link to `/about/`, Hugo will rewrite the URL to `../../about/`.
[config]: /getting-started/configuration/
[contentorg]: /content-management/organization/