Правка файла robots.txt
This commit is contained in:
parent
2e892cccfb
commit
762727290f
3 changed files with 31 additions and 1 deletions
|
|
@ -10,7 +10,24 @@ import solidJs from '@astrojs/solid-js';
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://advokat086.ru',
|
site: 'https://advokat086.ru',
|
||||||
integrations: [astroIcon(), mdx(), sitemap(), solidJs()],
|
integrations: [
|
||||||
|
astroIcon(),
|
||||||
|
mdx(),
|
||||||
|
sitemap({
|
||||||
|
filter: (page) => {
|
||||||
|
// Исключаем технические страницы
|
||||||
|
const blockedPaths = [
|
||||||
|
'/auth/', // авторизация и регистрация
|
||||||
|
'/admin', // админ-панель
|
||||||
|
'/api/', // API-эндпоинты
|
||||||
|
'/blog/search', // поиск по блогу
|
||||||
|
'/404', // страница ошибки
|
||||||
|
];
|
||||||
|
return !blockedPaths.some(path => page.includes(path));
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
solidJs(),
|
||||||
|
],
|
||||||
prefetch: true,
|
prefetch: true,
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [tailwindcss()]
|
plugins: [tailwindcss()]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
||||||
|
# Заблокированные страницы
|
||||||
|
Disallow: /auth/
|
||||||
|
Disallow: /admin
|
||||||
|
Disallow: /api/
|
||||||
|
Disallow: /blog/search
|
||||||
|
Disallow: /404
|
||||||
|
|
||||||
|
Sitemap: https://advokat086.ru/sitemap-index.xml
|
||||||
|
|
@ -48,6 +48,8 @@ if (Astro.request) {
|
||||||
{canonicalLink ? <link rel="canonical" href={canonicalLink} /> : null}
|
{canonicalLink ? <link rel="canonical" href={canonicalLink} /> : null}
|
||||||
<!-- yandex verification -->
|
<!-- yandex verification -->
|
||||||
<meta name="yandex-verification" content="b10d32bf1e46a882" />
|
<meta name="yandex-verification" content="b10d32bf1e46a882" />
|
||||||
|
<!-- sitemap -->
|
||||||
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
</head>
|
</head>
|
||||||
<body class={`${props.bodyClass || "bg-gray-50"}`}>
|
<body class={`${props.bodyClass || "bg-gray-50"}`}>
|
||||||
<Header />
|
<Header />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue