Skip to content

Commit b75b6cb

Browse files
committed
Add robots.txt and sitemap.txt
1 parent 74b977f commit b75b6cb

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ tmp/
66

77
.gitmodules
88
docker-base
9+
docs/sitemap.txt

build-docs-sitemap.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
echo "https://docs.imgproxy.net" > docs/sitemap.txt
4+
RE='^\* \[.+\]\((.+)\)'
5+
grep -E "$RE" docs/_sidebar.md | sed -E "s/$RE/https:\\/\\/docs.imgproxy.net\\/\\1/" >> docs/sitemap.txt

docs/_sidebar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* [Serving local files](serving_local_files)
1313
* [Serving files from Amazon S3](serving_files_from_s3)
1414
* [Serving files from Google Cloud Storage](serving_files_from_google_cloud_storage)
15-
* [Serving files from Azure Blob Storage](serving_files_from_azure_blob_storage.md)
15+
* [Serving files from Azure Blob Storage](serving_files_from_azure_blob_storage)
1616
* [New Relic](new_relic)
1717
* [Prometheus](prometheus)
1818
* [Datadog<i class='badge badge-v3'></i>](datadog)

docs/robots.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Allow: /

netlify.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
2-
base="docs"
3-
publish="/"
4-
command=""
2+
base="/"
3+
publish="docs/"
4+
command="./build-docs-sitemap.sh"
55

66
[[redirects]]
77
from = "/*"

0 commit comments

Comments
 (0)