feat: Leistungsseiten intern für SEO vernetzen
This commit is contained in:
1 parent
19dce0665f
commit
a235112f4b
11 files changed
+97
-12
No files matched your search
@@ -554,4 +554,14 @@ body { transition: opacity 0.3s ease-out, transform 0.3s ease-out, filter 0.3s e
|
||||
}
|
||||
.galerie-zurueck { display: inline-block; margin-top: 34px; font-size: 14px; color: var(--text-leise); }
|
||||
.galerie-zurueck:hover { color: var(--text); }
|
||||
.galerie-leistung {
|
||||
display: inline-block;
|
||||
margin: 34px 0 0 24px;
|
||||
font-size: 14px;
|
||||
color: var(--text);
|
||||
}
|
||||
.galerie-leistung:hover { opacity: 0.65; }
|
||||
@media (max-width: 760px) {
|
||||
.galerie-leistung { display: block; margin: 12px 0 0; }
|
||||
}
|
||||
@media (max-width: 760px) { .galerie-spalten { columns: 1; } }
|
||||
@@ -125,6 +125,7 @@
|
||||
<img class="einblenden" src="assets/portfolio/events/abiball/galerie-07.jpg" alt="Abiball – Foto 7" loading="lazy">
|
||||
</div>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./eventfotografie">Eventfotografie in Norddeutschland ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
</div>
|
||||
</section>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./sportfotografie">Sportfotografie in Hamburg und Wolfsburg ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
<img class="einblenden" src="assets/portfolio/fussball/hamburger-sv/galerie-freiburg/galerie-04.jpg" alt="Hamburger SV – Foto 11" loading="lazy">
|
||||
</div>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./sportfotografie">Sportfotografie in Hamburg ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
</div>
|
||||
</section>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./sportfotografie">Sportfotografie in Hannover ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
<img class="einblenden" src="assets/portfolio/fussball/nfv-pokalfinale-2026/galerie-12.jpg" alt="NFV-Pokalfinale 2026 – Foto 12" loading="lazy">
|
||||
</div>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./sportfotografie">Sportfotografie in Niedersachsen ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<img class="einblenden" src="assets/portfolio/events/omr-yes-wecancer/galerie-05.jpg" alt="OMR x yes!wecancer – Foto 5" loading="lazy">
|
||||
</div>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./eventfotografie">Eventfotografie in Hamburg und deutschlandweit ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
<img class="einblenden" src="assets/portfolio/sports/svg-lueneburg/galerie-fanfest/galerie-06.jpg" alt="SVG Lüneburg – Foto 19" loading="lazy">
|
||||
</div>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./sportfotografie">Sportfotografie in Lüneburg ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
</div>
|
||||
</section>
|
||||
<a class="galerie-zurueck" href="./portfolio">← Zurück zum Portfolio</a>
|
||||
<a class="galerie-leistung" href="./eventfotografie">Eventfotografie für Unternehmen ansehen →</a>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
+12
-11
@@ -1,26 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url><loc>https://leon-tonhaeuser.de/</loc><lastmod>2026-06-17</lastmod><priority>1.0</priority><changefreq>weekly</changefreq></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/</loc><lastmod>2026-07-30</lastmod><priority>1.0</priority><changefreq>weekly</changefreq></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio</loc><lastmod>2026-06-17</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-aufstiegsfeier</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-abiball</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-abiball</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-frauen-bundesliga</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-hamburger-sv</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-hamburger-sv</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-rhine-ruhr-3x3</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-rhine-ruhr-basketball</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-rhine-ruhr-beachvolleyball</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-rhine-ruhr-sport</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-svg-lueneburg</loc><lastmod>2026-06-17</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-fc-st-pauli</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-hannover-96</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-svg-lueneburg</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-fc-st-pauli</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-hannover-96</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-sv-meppen</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-deutschland-u21</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-nfv-pokalfinale-2026</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-yes-con-2026</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-omr-yes-wecancer</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-nfv-pokalfinale-2026</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-yes-con-2026</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-omr-yes-wecancer</loc><lastmod>2026-07-30</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/portfolio-beach-soccer-cup</loc><lastmod>2026-06-25</lastmod><priority>0.7</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/leistungen</loc><lastmod>2026-06-17</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/eventfotografie</loc><lastmod>2026-06-25</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/leistungen</loc><lastmod>2026-07-30</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/sportfotografie</loc><lastmod>2026-07-30</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/eventfotografie</loc><lastmod>2026-07-30</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/über-mich</loc><lastmod>2026-06-17</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/kontakt</loc><lastmod>2026-06-17</lastmod><priority>0.8</priority></url>
|
||||
<url><loc>https://leon-tonhaeuser.de/datenschutz</loc><lastmod>2026-06-17</lastmod><priority>0.2</priority></url>
|
||||
|
||||
+67
-1
@@ -1,6 +1,6 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
||||
import { existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import vm from 'node:vm';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
@@ -227,6 +227,72 @@ if (wants('event')) {
|
||||
});
|
||||
}
|
||||
|
||||
if (wants('links')) {
|
||||
const sportPages = [
|
||||
'portfolio-hamburger-sv.html',
|
||||
'portfolio-fc-st-pauli.html',
|
||||
'portfolio-hannover-96.html',
|
||||
'portfolio-svg-lueneburg.html',
|
||||
'portfolio-nfv-pokalfinale-2026.html'
|
||||
];
|
||||
const eventPages = [
|
||||
'portfolio-yes-con-2026.html',
|
||||
'portfolio-omr-yes-wecancer.html',
|
||||
'portfolio-abiball.html'
|
||||
];
|
||||
|
||||
check('Sportreferenzen verlinken die Sportseite', () => {
|
||||
for (const file of sportPages) {
|
||||
assert.ok(pageHtml(file).includes('href="./sportfotografie"'), `${file} fehlt`);
|
||||
}
|
||||
});
|
||||
|
||||
check('Eventreferenzen verlinken die Eventseite', () => {
|
||||
for (const file of eventPages) {
|
||||
assert.ok(pageHtml(file).includes('href="./eventfotografie"'), `${file} fehlt`);
|
||||
}
|
||||
});
|
||||
|
||||
check('Sitemap enthält die Sportseite und aktuelle Hub-Daten', () => {
|
||||
const xml = read('public/sitemap.xml');
|
||||
assert.equal(count(xml, /<loc>https:\/\/leon-tonhaeuser\.de\/sportfotografie<\/loc>/g), 1);
|
||||
for (const url of ['/', '/leistungen', '/eventfotografie', '/sportfotografie']) {
|
||||
const escaped = url === '/' ? '\\/' : url.replace(/\//g, '\\/');
|
||||
const entry = new RegExp(`<loc>https:\\/\\/leon-tonhaeuser\\.de${escaped}<\\/loc><lastmod>2026-07-30<\\/lastmod>`);
|
||||
assert.ok(entry.test(xml), `${url} hat kein lastmod 2026-07-30`);
|
||||
}
|
||||
});
|
||||
|
||||
check('alle konfigurierten Seiten haben genau einen statischen SEO-Block', () => {
|
||||
const config = loadConfig();
|
||||
for (const [urlPath, page] of Object.entries(config.PAGES)) {
|
||||
const file = urlPath === '/' ? 'index.html' : `${urlPath.slice(1)}.html`;
|
||||
const html = pageHtml(file);
|
||||
assert.equal(count(html, /<!-- STATIC-SEO:/g), 1, `${file}: Startmarker`);
|
||||
assert.equal(count(html, /<!-- \/STATIC-SEO -->/g), 1, `${file}: Endmarker`);
|
||||
assert.equal(count(html, /<title>/g), 1, `${file}: Title`);
|
||||
assert.equal(count(html, /<meta name="description"/g), 1, `${file}: Description`);
|
||||
assert.ok(html.includes(`<title>${htmlEscape(page.title)}</title>`), `${file}: Title-Wert`);
|
||||
}
|
||||
});
|
||||
|
||||
check('alle relativen HTML-Links zeigen auf vorhandene Seiten', () => {
|
||||
const files = readdirSync(PUBLIC).filter((file) => file.endsWith('.html'));
|
||||
for (const file of files) {
|
||||
const html = pageHtml(file);
|
||||
const hrefs = Array.from(
|
||||
html.matchAll(/<a\b[^>]*\shref="(\.\/[^"#?]*)/g),
|
||||
(match) => match[1]
|
||||
);
|
||||
for (const href of hrefs) {
|
||||
const clean = decodeURIComponent(href.slice(2));
|
||||
const target = clean === '' ? 'index.html' : clean.endsWith('.html') ? clean : `${clean}.html`;
|
||||
assert.ok(existsSync(path.join(PUBLIC, target)), `${file} → ${href}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (failures.length) {
|
||||
console.error(`\n${failures.length} Prüfung(en) fehlgeschlagen.`);
|
||||
process.exit(1);
|
||||
|
||||
Reference in new issue
Block a user