Add robots.txt template to disallow robots

See: https://github.com/spf13/hugo/blob/master/docs/content/extras/robots-txt.md
This commit is contained in:
Alan Orth 2016-09-21 22:25:36 +03:00
parent d3fa258e8b
commit 2696466e0e
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ languageCode = "en-us"
title = "CGSpace Notes"
newContentEditor = "vim"
theme = "hugo-theme-bootstrap4-blog"
enableRobotsTXT = true
[permalinks]
# use 2016-09 as slug, since my posts are always monthly

4
layouts/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-agent: *
{{range .Data.Pages}}
Disallow: {{.RelPermalink}}{{end}}