doc(seo): improve seo after migration

This commit is contained in:
Samuel Berthe 2026-04-21 16:24:57 +02:00
parent bb8ac9b0cd
commit 6d8b2b3671
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C

View file

@ -64,10 +64,20 @@ function buildRedirects(base) {
const base = '/awesome-prometheus-alerts';
/** Legacy .html page redirects from the pre-Astro (Jekyll) site.
* These pages 404 after the Astro migration since they moved to trailing-slash directories.
* rules.html alone had 105 referring domains and was the #1 traffic page critical to preserve. */
const legacyHtmlRedirects = {
[`${base}/rules.html`]: { destination: `${base}/rules/`, status: 301 },
[`${base}/alertmanager.html`]: { destination: `${base}/alertmanager/`, status: 301 },
[`${base}/blackbox-exporter.html`]: { destination: `${base}/blackbox-exporter/`, status: 301 },
[`${base}/sleep-peacefully.html`]: { destination: `${base}/sleep-peacefully/`, status: 301 },
};
export default defineConfig({
site: 'https://samber.github.io',
base,
redirects: buildRedirects(base),
redirects: { ...buildRedirects(base), ...legacyHtmlRedirects },
output: 'static',
integrations: [
sitemap({