Forráskód Böngészése

feat(seo): add default robots.txt with sitemap

Help automate adding new site to Google Search Console
George Cushen 4 éve
szülő
commit
514907d534
2 módosított fájl, 4 hozzáadás és 0 törlés
  1. 1 0
      exampleSite/config/_default/config.toml
  2. 3 0
      layouts/robots.txt

+ 1 - 0
exampleSite/config/_default/config.toml

@@ -35,6 +35,7 @@ removePathAccents = true  # Workaround for https://github.com/gohugoio/hugo/issu
 summaryLength = 30  # Listing summary length in words. Also, see `abstract_length` in `params.toml`.
 paginate = 10  # Number of items per page in paginated lists.
 enableEmoji = true
+enableRobotsTXT = true
 footnotereturnlinkcontents = "<sup>^</sup>"
 ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
 

+ 3 - 0
layouts/robots.txt

@@ -0,0 +1,3 @@
+User-agent: *
+
+Sitemap: {{ "sitemap.xml" | absURL }}