Add disable_seo config to keep preview deployments out of search engines
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Vendored
+4
@@ -18,6 +18,10 @@ export default function () {
|
||||
const { ROOT_DIR, PUBLIC_DIR } = grabDirNames();
|
||||
global.BUNEXT_CONFIG = (await grabConfig()) || {};
|
||||
global.BUNEXT_CONSTANTS = grabConstants();
|
||||
if (global.BUNEXT_CONFIG.disable_seo) {
|
||||
log.warn(`\`disable_seo\` is set: the server blocks all crawlers at ` +
|
||||
`/robots.txt, so the generated robots.txt is not served.`);
|
||||
}
|
||||
const { output, chunk_size, chunks_dir, ...sitemap_config } = global.BUNEXT_CONFIG.sitemap || {};
|
||||
if (!existsSync(grabPageLastmodFile(sitemap_config.lastmod_file))) {
|
||||
log.warn(`No page lastmod record found. Run \`bunext build\` first ` +
|
||||
|
||||
Reference in New Issue
Block a user