From 476d237b402bfc7e3bb31d47fdf2f5e0e42299ba Mon Sep 17 00:00:00 2001 From: Tobias Feigel Date: Mon, 22 Sep 2025 09:50:12 +0200 Subject: [PATCH 1/3] Added Sitemap --- site/config/config.php | 23 +++++++++++++++++++++++ site/snippets/sitemap.php | 11 +++++++++++ 2 files changed, 34 insertions(+) create mode 100644 site/snippets/sitemap.php diff --git a/site/config/config.php b/site/config/config.php index ab6e282..236cdb3 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -6,5 +6,28 @@ return [ 'vue' => [ 'compiler' => false ] + ], + 'routes' => [ + [ + 'pattern' => 'sitemap.xml', + 'action' => function() { + $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); + } + ] ], ]; diff --git a/site/snippets/sitemap.php b/site/snippets/sitemap.php new file mode 100644 index 0000000..9510636 --- /dev/null +++ b/site/snippets/sitemap.php @@ -0,0 +1,11 @@ +'; ?> + + + uri(), $ignore)) continue ?> + + url()) ?> + modified('c', 'date') ?> + isHomePage()) ? 1 : number_format(0.5 / $p->depth(), 1) ?> + + + \ No newline at end of file From 95dce6b534593fa2ae02c5a1cc7c605c1945c291 Mon Sep 17 00:00:00 2001 From: Tobias Feigel Date: Mon, 22 Sep 2025 09:54:42 +0200 Subject: [PATCH 2/3] Revert "Merge commit 'db0870bdcb7a4eee760ba350406413b5fe84e638' into develop" This reverts commit 113234816ec19bc585116c55ceedca86cd865748, reversing changes made to 51ff2484703c5a0d13f47df3fd381a63ce5c98b8. --- site/config/config.php | 40 ++++++++++++++++++--------------------- site/snippets/sitemap.php | 11 ----------- 2 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 site/snippets/sitemap.php diff --git a/site/config/config.php b/site/config/config.php index 236cdb3..6add258 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -7,27 +7,23 @@ return [ 'compiler' => false ] ], - 'routes' => [ - [ - 'pattern' => 'sitemap.xml', - 'action' => function() { - $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); - } + + // Bessere Scanner-Kompatibilität + 'cache' => [ + 'pages' => [ + 'active' => true ] - ], + ], + + // 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 + ] ]; diff --git a/site/snippets/sitemap.php b/site/snippets/sitemap.php deleted file mode 100644 index 9510636..0000000 --- a/site/snippets/sitemap.php +++ /dev/null @@ -1,11 +0,0 @@ -'; ?> - - - uri(), $ignore)) continue ?> - - url()) ?> - modified('c', 'date') ?> - isHomePage()) ? 1 : number_format(0.5 / $p->depth(), 1) ?> - - - \ No newline at end of file From 2f782a4f6e2924c7aa8b5e9b6232dbe7f056f950 Mon Sep 17 00:00:00 2001 From: Tobias Feigel Date: Mon, 22 Sep 2025 09:58:10 +0200 Subject: [PATCH 3/3] Sitemap angepasst --- robots.txt | 18 +++--------------- site/config/config.php | 38 +++++++++++++++++++++----------------- site/snippets/sitemap.php | 11 +++++++++++ 3 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 site/snippets/sitemap.php diff --git a/robots.txt b/robots.txt index f1c2773..22a08ce 100644 --- a/robots.txt +++ b/robots.txt @@ -1,23 +1,11 @@ User-agent: * 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: https://www.schachfreunde-badsteben.de/sitemap.xml +https://www.schachfreunde-badsteben.de/sitemap.xml # Wichtige Seiten explizit erlauben Allow: /datenschutz Allow: /impressum -Allow: /kontakt \ No newline at end of file +Allow: /kontakt +Allow: /home \ No newline at end of file diff --git a/site/config/config.php b/site/config/config.php index 6add258..95b10d4 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -7,23 +7,27 @@ return [ 'compiler' => false ] ], - - // Bessere Scanner-Kompatibilität - 'cache' => [ - 'pages' => [ - 'active' => true + 'routes' => [ + [ + 'pattern' => 'sitemap.xml', + 'action' => function() { + $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 - ] ]; diff --git a/site/snippets/sitemap.php b/site/snippets/sitemap.php new file mode 100644 index 0000000..9510636 --- /dev/null +++ b/site/snippets/sitemap.php @@ -0,0 +1,11 @@ +'; ?> + + + uri(), $ignore)) continue ?> + + url()) ?> + modified('c', 'date') ?> + isHomePage()) ? 1 : number_format(0.5 / $p->depth(), 1) ?> + + + \ No newline at end of file