@astrojs/sitemap@3.1.0
版本发布时间: 2024-02-20 22:50:07
withastro/astro最新发布版本:astro@5.0.0-beta.2(2024-09-24 17:12:05)
Minor Changes
-
#9846
9b78c992750cdb99c40a89a00ea2a0d1c00877d7
Thanks @ktym4a! - Adds a new configuration optionprefix
that allows you to change the defaultsitemap-*.xml
file name.By default, running
astro build
creates bothsitemap-index.xml
andsitemap-0.xml
in your output directory.To change the names of these files (e.g. to
astrosite-index.xml
andastrosite-0.xml
), set theprefix
option in yoursitemap
integration configuration:import { defineConfig } from 'astro/config'; import sitemap from '@astrojs/sitemap'; export default defineConfig({ site: 'https://example.com', integrations: [ sitemap({ prefix: 'astrosite-', }), ], });
This option is useful when Google Search Console is unable to fetch your default sitemap files, but can read renamed files.