Skip to content

Commit

Permalink
Fix issue #524: Updating robots.txt with Sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypa committed Oct 4, 2024
1 parent 6fde4b0 commit d942f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/integration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default ({ config: _themeConfig = 'src/config.yaml' } = {}): AstroIntegra
const pattern = /^Sitemap:(.*)$/m;

if (!pattern.test(robotsTxt)) {
fs.appendFileSync(robotsTxtFileInOut, `${os.EOL}${os.EOL}Sitemap: ${sitemapUrl}`, {
fs.writeFileSync(robotsTxtFileInOut, `${robotsTxt}${os.EOL}${os.EOL}Sitemap: ${sitemapUrl}`, {
encoding: 'utf8',
flag: 'w',
});
Expand Down

0 comments on commit d942f2b

Please sign in to comment.