Only display notice if needed (#659)
This commit is contained in:
parent
c48acb3d84
commit
1b73f95806
2 changed files with 8 additions and 1 deletions
5
.changeset/pink-buttons-destroy.md
Normal file
5
.changeset/pink-buttons-destroy.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Only show the buildOptions.site notice if not already set
|
|
@ -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 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 mode: RuntimeMode = 'production';
|
||||||
const runtime = await createRuntime(astroConfig, { mode, logging: runtimeLogging });
|
const runtime = await createRuntime(astroConfig, { mode, logging: runtimeLogging });
|
||||||
|
|
Loading…
Reference in a new issue