From d8fba29bb5a673bbdfdbf6893babed5761cfeff6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 8 Sep 2021 21:48:31 +0200 Subject: [PATCH] feat: add robots template (#203) --- exampleSite/config.yaml | 5 ++--- exampleSite/content/usage/configuration.md | 6 ++++++ exampleSite/content/usage/getting-started.md | 3 +++ exampleSite/static/robots.txt | 4 ---- layouts/robots.txt | 4 ++++ 5 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 exampleSite/static/robots.txt create mode 100644 layouts/robots.txt diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 6a05700..22d8dc7 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -7,11 +7,11 @@ pygmentsCodeFences: true timeout: 180000 pluralizeListTitles: false -# Geekdoc configuration disablePathToLower: true enableGitInfo: true -# Needed for mermaid shortcodes +enableRobotsTXT: true + markup: goldmark: renderer: @@ -36,7 +36,6 @@ outputs: - HTML params: - # geekdocMenuBundle: true geekdocToC: 3 geekdocTagsToMenu: true diff --git a/exampleSite/content/usage/configuration.md b/exampleSite/content/usage/configuration.md index 4be4046..4b8070a 100644 --- a/exampleSite/content/usage/configuration.md +++ b/exampleSite/content/usage/configuration.md @@ -21,6 +21,9 @@ pygmentsCodeFences = true disablePathToLower = true enableGitInfo = true +# Required if you want to render robots.txt template +enableRobotsTXT = true + [markup] [markup.goldmark.renderer] # Needed for mermaid shortcode @@ -120,6 +123,9 @@ pygmentsCodeFences: true disablePathToLower: true enableGitInfo: true +# Required if you want to render robots.txt template +enableRobotsTXT: true + markup: goldmark: # Needed for mermaid shortcode diff --git a/exampleSite/content/usage/getting-started.md b/exampleSite/content/usage/getting-started.md index 3e5d9e6..c5c924f 100644 --- a/exampleSite/content/usage/getting-started.md +++ b/exampleSite/content/usage/getting-started.md @@ -55,6 +55,9 @@ To prepare your new site environment just a few steps are required: pygmentsCodeFences = true disablePathToLower = true + # Required if you want to render robots.txt template + enableRobotsTXT = true + # Needed for mermaid shortcodes [markup] [markup.goldmark.renderer] diff --git a/exampleSite/static/robots.txt b/exampleSite/static/robots.txt deleted file mode 100644 index 03ed307..0000000 --- a/exampleSite/static/robots.txt +++ /dev/null @@ -1,4 +0,0 @@ -User-agent: * -Disallow: /categories/* -Disallow: /tags/* -Sitemap: https://geekdocs.de/sitemap.xml diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..fb3345b --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /tags/* + +Sitemap: {{ "sitemap.xml" | absURL }}