diff --git a/components/templates/src/builtins/robots.txt b/components/templates/src/builtins/robots.txt index b345a1a10c..b6ac790cee 100644 --- a/components/templates/src/builtins/robots.txt +++ b/components/templates/src/builtins/robots.txt @@ -1,3 +1,4 @@ User-agent: * +Disallow: Allow: / Sitemap: {{ get_url(path="sitemap.xml") }} diff --git a/docs/content/documentation/templates/robots.md b/docs/content/documentation/templates/robots.md index 40a108959b..c93ff73bbb 100644 --- a/docs/content/documentation/templates/robots.md +++ b/docs/content/documentation/templates/robots.md @@ -11,6 +11,7 @@ and the default is what most sites want: ```jinja2 User-agent: * +Disallow: Allow: / Sitemap: {{/* get_url(path="sitemap.xml") */}} ``` diff --git a/test_site/templates/robots.txt b/test_site/templates/robots.txt index 3da696f461..be62e4f6d9 100644 --- a/test_site/templates/robots.txt +++ b/test_site/templates/robots.txt @@ -1,3 +1,4 @@ User-agent: zola +Disallow: Allow: / Sitemap: {{config.base_url}}/sitemap.xml