-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6580199
commit d048494
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import tailwind from '@astrojs/tailwind'; | ||
|
||
import sitemap from "@astrojs/sitemap"; | ||
import robotsTxt from 'astro-robots-txt'; | ||
import robotsConfig from './robots-txt.config'; | ||
import sitemap from '@astrojs/sitemap'; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind(), sitemap()] | ||
}); | ||
site: 'https://iztechai.com', | ||
integrations: [tailwind(), robotsTxt(robotsConfig), sitemap()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { RobotsTxtOptions } from 'astro-robots-txt'; | ||
import siteConfig from './site.config'; | ||
|
||
const robotsConfig: RobotsTxtOptions = { | ||
policy: [ | ||
{ | ||
userAgent: '*', | ||
// The next line enables or disables the crawling on the `robots.txt` level | ||
disallow: siteConfig.disableIndexing ? '/' : '', | ||
}, | ||
], | ||
sitemapBaseFileName: 'sitemap-index', // default 'sitemap-index' | ||
// transform(content) { | ||
// const commentsList = ['Some text before main content', 'Second line', 'Third line']; | ||
// const comments = commentsList.map((item) => `# ${item}.`).join('\n'); | ||
// return `${comments}\n\n${content}`; | ||
// }, | ||
}; | ||
|
||
export default robotsConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
disableIndexing: false, | ||
}; |