Merge branch 'develop'
This commit is contained in:
+3
-15
@@ -1,23 +1,11 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /
|
Allow: /
|
||||||
|
|
||||||
# Spezielle Erlaubnis für DSGVO/Legal Scanner
|
|
||||||
User-agent: LegalCockpitBot
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
User-agent: CookieBot
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
User-agent: DataProtectionBot
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
User-agent: GDPRBot
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
# Sitemap (falls vorhanden)
|
# Sitemap (falls vorhanden)
|
||||||
# Sitemap: https://www.schachfreunde-badsteben.de/sitemap.xml
|
https://www.schachfreunde-badsteben.de/sitemap.xml
|
||||||
|
|
||||||
# Wichtige Seiten explizit erlauben
|
# Wichtige Seiten explizit erlauben
|
||||||
Allow: /datenschutz
|
Allow: /datenschutz
|
||||||
Allow: /impressum
|
Allow: /impressum
|
||||||
Allow: /kontakt
|
Allow: /kontakt
|
||||||
|
Allow: /home
|
||||||
+21
-17
@@ -7,23 +7,27 @@ return [
|
|||||||
'compiler' => false
|
'compiler' => false
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'routes' => [
|
||||||
// Bessere Scanner-Kompatibilität
|
[
|
||||||
'cache' => [
|
'pattern' => 'sitemap.xml',
|
||||||
'pages' => [
|
'action' => function() {
|
||||||
'active' => true
|
$pages = site()->pages()->index();
|
||||||
|
|
||||||
|
// fetch the pages to ignore from the config settings,
|
||||||
|
// if nothing is set, we ignore the error page
|
||||||
|
$ignore = kirby()->option('sitemap.ignore', ['error']);
|
||||||
|
|
||||||
|
$content = snippet('sitemap', compact('pages', 'ignore'), true);
|
||||||
|
|
||||||
|
// return response with correct header type
|
||||||
|
return new Kirby\Cms\Response($content, 'application/xml');
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'pattern' => 'sitemap',
|
||||||
|
'action' => function() {
|
||||||
|
return go('sitemap.xml', 301);
|
||||||
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
// Headers für bessere Scanner-Kompatibilität
|
|
||||||
'headers' => [
|
|
||||||
'X-Frame-Options' => 'SAMEORIGIN',
|
|
||||||
'X-XSS-Protection' => '1; mode=block'
|
|
||||||
],
|
|
||||||
|
|
||||||
// Robots-freundliche Einstellungen
|
|
||||||
'smartypants' => true,
|
|
||||||
'markdown' => [
|
|
||||||
'extra' => true
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?= '<?xml version="1.0" encoding="utf-8"?>'; ?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<?php foreach ($pages as $p): ?>
|
||||||
|
<?php if (in_array($p->uri(), $ignore)) continue ?>
|
||||||
|
<url>
|
||||||
|
<loc><?= html($p->url()) ?></loc>
|
||||||
|
<lastmod><?= $p->modified('c', 'date') ?></lastmod>
|
||||||
|
<priority><?= ($p->isHomePage()) ? 1 : number_format(0.5 / $p->depth(), 1) ?></priority>
|
||||||
|
</url>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</urlset>
|
||||||
Reference in New Issue
Block a user