From dff69c5bd312f40ba46098526f709f4058e33857 Mon Sep 17 00:00:00 2001 From: leafee98 Date: Tue, 10 May 2022 21:34:51 +0800 Subject: [PATCH] enable robots.txt by default use CRLF in robots.txt --- exampleSite/config.toml | 1 + layouts/robots.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 99b920e..11d2869 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,6 +1,7 @@ title = "Flat theme" theme = "hugo-theme-flat" themesDir = "../.." +enableRobotsTXT = true hasCJKLanguage = true paginate = 6 baseURL = "" diff --git a/layouts/robots.txt b/layouts/robots.txt index 81fbc0b..21f331f 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,8 +1,8 @@ -User-agent: * -Allow: /posts/ -Allow: /tags/ -Allow: /categories/ -Allow: /about/ -Disallow: * - -Sitemap: {{ .Site.BaseURL }}sitemap.xml \ No newline at end of file +User-agent: * +Allow: /posts/ +Allow: /tags/ +Allow: /categories/ +Allow: /about/ + +Disallow: * +Sitemap: {{ .Site.BaseURL }}sitemap.xml