From b75b6cb5a27baf167325520b3f22a8d000ccba56 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Wed, 16 Feb 2022 20:54:37 +0600 Subject: [PATCH] Add robots.txt and sitemap.txt --- .gitignore | 1 + build-docs-sitemap.sh | 5 +++++ docs/_sidebar.md | 2 +- docs/robots.txt | 2 ++ netlify.toml | 6 +++--- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 build-docs-sitemap.sh create mode 100644 docs/robots.txt diff --git a/.gitignore b/.gitignore index e273c445..c3dc9ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ tmp/ .gitmodules docker-base +docs/sitemap.txt diff --git a/build-docs-sitemap.sh b/build-docs-sitemap.sh new file mode 100755 index 00000000..202778b0 --- /dev/null +++ b/build-docs-sitemap.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "https://docs.imgproxy.net" > docs/sitemap.txt +RE='^\* \[.+\]\((.+)\)' +grep -E "$RE" docs/_sidebar.md | sed -E "s/$RE/https:\\/\\/docs.imgproxy.net\\/\\1/" >> docs/sitemap.txt diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 74ce9178..b0d5b341 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -12,7 +12,7 @@ * [Serving local files](serving_local_files) * [Serving files from Amazon S3](serving_files_from_s3) * [Serving files from Google Cloud Storage](serving_files_from_google_cloud_storage) -* [Serving files from Azure Blob Storage](serving_files_from_azure_blob_storage.md) +* [Serving files from Azure Blob Storage](serving_files_from_azure_blob_storage) * [New Relic](new_relic) * [Prometheus](prometheus) * [Datadog](datadog) diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 00000000..c2a49f4f --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/netlify.toml b/netlify.toml index 6f6a8518..f4b1a39b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,7 @@ [build] - base="docs" - publish="/" - command="" + base="/" + publish="docs/" + command="./build-docs-sitemap.sh" [[redirects]] from = "/*"