Skip to content

Commit d942f2b

Browse files
committed
Fix issue #524: Updating robots.txt with Sitemap
1 parent 6fde4b0 commit d942f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vendor/integration/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default ({ config: _themeConfig = 'src/config.yaml' } = {}): AstroIntegra
9595
const pattern = /^Sitemap:(.*)$/m;
9696

9797
if (!pattern.test(robotsTxt)) {
98-
fs.appendFileSync(robotsTxtFileInOut, `${os.EOL}${os.EOL}Sitemap: ${sitemapUrl}`, {
98+
fs.writeFileSync(robotsTxtFileInOut, `${robotsTxt}${os.EOL}${os.EOL}Sitemap: ${sitemapUrl}`, {
9999
encoding: 'utf8',
100100
flag: 'w',
101101
});

0 commit comments

Comments
 (0)