Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'

This commit is contained in:
Bjørn Erik Pedersen
2023-12-04 15:24:01 +01:00
810 changed files with 24147 additions and 7766 deletions

View File

@@ -14,7 +14,7 @@ aliases: [/extras/robots-txt/]
To generate a robots.txt file from a template, change the [site configuration]:
{{< code-toggle file="hugo" >}}
{{< code-toggle file=hugo >}}
enableRobotsTXT = true
{{< /code-toggle >}}
@@ -35,7 +35,7 @@ You may overwrite the internal template with a custom template. Hugo selects the
## robots.txt template example
{{< code file="layouts/robots.txt" >}}
{{< code file=layouts/robots.txt >}}
User-agent: *
{{ range .Pages }}
Disallow: {{ .RelPermalink }}
@@ -47,7 +47,7 @@ This template creates a robots.txt file with a `Disallow` directive for each pag
{{% note %}}
To create a robots.txt file without using a template:
1. Set `enableRobotsTXT` to `false` in the [site configuration].
1. Set `enableRobotsTXT` to `false` in the site configuration.
2. Create a robots.txt file in the `static` directory.
Remember that Hugo copies everything in the [static directory][static] to the root of `publishDir` (typically `public`) when you build your site.