Skip to content

Commit 2dcddb7

Browse files
committed
Add robots.txt
1 parent 587115e commit 2dcddb7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

generate/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,18 @@ await fs.writeFile(
437437

438438
console.log('✔ `/sitemap.xml`')
439439

440+
await fs.writeFile(
441+
new URL('../build/robots.txt', import.meta.url),
442+
[
443+
'User-agent: *',
444+
'Allow: /',
445+
'Sitemap: ' + new URL('sitemap.xml', origin).href,
446+
''
447+
].join('\n')
448+
)
449+
450+
console.log('✔ `/robots.txt`')
451+
440452
/**
441453
*
442454
* @param {() => Root} render

0 commit comments

Comments
 (0)