Добавлена система Sitemap
This commit is contained in:
parent
b238967d3c
commit
2b3bf52796
6 changed files with 39 additions and 3 deletions
|
|
@ -4,10 +4,17 @@ import tailwindcss from '@tailwindcss/vite';
|
|||
import node from '@astrojs/node';
|
||||
import mdx from '@astrojs/mdx';
|
||||
import icon from "astro-icon";
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [mdx(), icon()],
|
||||
site: 'https://avtourist-surgut.ru',
|
||||
integrations: [mdx(), icon(), sitemap({
|
||||
filter: (page) => {
|
||||
const blockedPaths = ['/auth/', '/blog/search', '/404'];
|
||||
return !blockedPaths.some(path => page.includes(path));
|
||||
},
|
||||
})],
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/mdx": "^5.0.3",
|
||||
"@astrojs/node": "^10.0.4",
|
||||
"@astrojs/sitemap": "^3.7.2",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
"astro": "^6.0.8",
|
||||
"astro-icon": "^1.1.5",
|
||||
|
|
|
|||
|
|
@ -3,3 +3,10 @@
|
|||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
# Заблокированные страницы
|
||||
Disallow: /auth/
|
||||
Disallow: /404
|
||||
Disallow: /blog/search
|
||||
|
||||
Sitemap: https://avtourist-surgut.ru/sitemap-index.xml
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ const {
|
|||
<title>{title} {SITE_TITLE_SUFFIX}</title>
|
||||
<meta name="description" content={description} />
|
||||
{canonicalLink && <link rel="canonical" href={canonicalLink} />}
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
</head>
|
||||
<body>
|
||||
<Header />
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const { title, description, canonicalLink, breadcrumbs } = Astro.props;
|
|||
<title>{title} {SITE_TITLE_SUFFIX}</title>
|
||||
<meta name="description" content={description} />
|
||||
{canonicalLink && <link rel="canonical" href={canonicalLink} />}
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
<!-- Yandex верификация -->
|
||||
<meta name="yandex-verification" content="be3edfd138348e43" />
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue