diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-14 07:40:42 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-14 07:40:42 +0200 |
| commit | d2ac62589a78a259ff930e352eb763abdcb958a2 (patch) | |
| tree | e672dc52d650324459e734ba2d13be65a306bc31 /layouts/robots.txt | |
| parent | e94a222c9cf28be8884867696222296fc710b985 (diff) | |
| download | gohugo-theme-ed-d2ac62589a78a259ff930e352eb763abdcb958a2.tar.gz | |
Rework robots.txt
Diffstat (limited to 'layouts/robots.txt')
| -rw-r--r-- | layouts/robots.txt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/layouts/robots.txt b/layouts/robots.txt index 9f95983..dbc405e 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,12 +1,11 @@ -{{- $url := urls.Parse site.BaseURL -}} -# robots.txt file for "{{ site.Title }}", {{ $url.Host }} +# TODO: Does not work +{{- $url := urls.Parse ("/" | absURL) -}} +# robots.txt file for "{{ site.Title }}" website, {{ $url.Host }} User-agent: * {{- if eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }} Allow: / -Sitemap: {{ site.BaseURL }}/sitemap.xml +# TODO: implement sitemap.xml +# Sitemap: {{ "stemap.xml" | absURL }} {{- else }} Disallow: / {{- end }} - -# TODO: implement sitemap.xml -# Sitemap: {{ site.BaseURL }}/sitemap.xml |
