Config angepasst für korrekte Homepage

This commit is contained in:
2025-09-22 10:05:46 +02:00
parent 2f782a4f6e
commit b829f0e479
3 changed files with 57 additions and 8 deletions
+18 -3
View File
@@ -1,11 +1,26 @@
User-agent: *
Allow: /
Crawl-delay: 1
# Sitemap (falls vorhanden)
https://www.schachfreunde-badsteben.de/sitemap.xml
# Spezielle Erlaubnis für DSGVO/Legal Scanner
User-agent: LegalCockpitBot
Allow: /
Crawl-delay: 0
User-agent: cockpit.legal
Allow: /
Crawl-delay: 0
User-agent: Mozilla*
Allow: /
# Sitemap
Sitemap: https://www.schachfreunde-badsteben.de/sitemap.xml
# Wichtige Seiten explizit erlauben
Allow: /
Allow: /datenschutz
Allow: /impressum
Allow: /kontakt
Allow: /home
Allow: /home
Allow: /news
+10
View File
@@ -2,12 +2,22 @@
return [
'debug' => true,
// Home-Seite explizit definieren
'home' => 'home',
'panel' => [
'vue' => [
'compiler' => false
]
],
'routes' => [
[
'pattern' => '/',
'action' => function() {
return site()->homePage();
}
],
[
'pattern' => 'sitemap.xml',
'action' => function() {
+29 -5
View File
@@ -1,5 +1,29 @@
<?php snippet('layout', slots: true) ?>
<h1>Hallo Welt!</h1>
<?php endsnippet() ?>
<?php
// Wenn dies die Startseite ist, verwende die Home-Vorlage
if ($page->isHomePage()) {
snippet('layout', slots: true);
?>
<h1>Herzlich Willkommen!</h1>
<?= $page->text()->kirbytext() ?>
<?php snippet('home-news', [
'news' => page('news')->children()->limit(3)->sortBy('date', 'desc'),
]); ?>
<?php snippet('home-termine'); ?>
<?php snippet('puzzle'); ?>
<?php
endsnippet();
} else {
// Für andere Seiten
snippet('layout', slots: true);
?>
<h1><?= $page->title()->esc() ?></h1>
<?= $page->text()->kirbytext() ?>
<?php
endsnippet();
}
?>