diff --git a/.changeset/pink-buttons-destroy.md b/.changeset/pink-buttons-destroy.md new file mode 100644 index 000000000..f5291b456 --- /dev/null +++ b/.changeset/pink-buttons-destroy.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Only show the buildOptions.site notice if not already set diff --git a/packages/astro/src/build.ts b/packages/astro/src/build.ts index 073dbd2c3..c5aac23c7 100644 --- a/packages/astro/src/build.ts +++ b/packages/astro/src/build.ts @@ -53,7 +53,9 @@ export async function build(astroConfig: AstroConfig, logging: LogOptions = defa }; // warn users if missing config item in build that may result in broken SEO (can’t disable, as they should provide this) - warn(logging, 'config', `Set "buildOptions.site" to generate correct canonical URLs and sitemap`); + if (!astroConfig.buildOptions.site) { + warn(logging, 'config', `Set "buildOptions.site" to generate correct canonical URLs and sitemap`); + } const mode: RuntimeMode = 'production'; const runtime = await createRuntime(astroConfig, { mode, logging: runtimeLogging });