summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Tc001 <55956895+Tc-001@users.noreply.github.com> 2023-03-07 20:45:36 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-07 20:45:36 +0200
commit28e1224d120f46af7822d02a3abdba66dc650a2e (patch)
tree4ef512afb8911657f1d17dccfdd5dfa39cb6996e
parentcf8454f7963ce1e034a3e2968384190705f63043 (diff)
downloadastro-28e1224d120f46af7822d02a3abdba66dc650a2e.tar.gz
astro-28e1224d120f46af7822d02a3abdba66dc650a2e.tar.zst
astro-28e1224d120f46af7822d02a3abdba66dc650a2e.zip
Add instructions on how to link the sitemap (#6448)
* Add instructions on how to link the sitemap * Update packages/integrations/sitemap/README.md Co-authored-by: Dan Jutan <danjutan@gmail.com> --------- Co-authored-by: Dan Jutan <danjutan@gmail.com>
-rw-r--r--packages/integrations/sitemap/README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/integrations/sitemap/README.md b/packages/integrations/sitemap/README.md
index 80ed6a9c3..f4949ca51 100644
--- a/packages/integrations/sitemap/README.md
+++ b/packages/integrations/sitemap/README.md
@@ -82,6 +82,22 @@ Now, [build your site for production](https://docs.astro.build/en/reference/cli-
> **Warning**
> If you forget to add a `site`, you'll get a friendly warning when you build, and the `sitemap-index.xml` file won't be generated.
+After verifying that the sitemaps are built, you can add them to your site's `<head>` and the `robots.txt` file for crawlers to pick up.
+
+```html ins={3}
+// src/layouts/Layout.astro
+<head>
+ <link rel="sitemap" href="/sitemap-index.xml">
+</head>
+```
+
+```txt ins={4} title="public/robots.txt"
+User-agent: *
+Allow: /
+
+Sitemap: https://<YOUR SITE>/sitemap-index.xml
+```
+
### Example of generated files for a two-page website
**`sitemap-index.xml`**