mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 00:47:18 +08:00
doc(seo): improve seo after migration
This commit is contained in:
parent
bb8ac9b0cd
commit
6d8b2b3671
1 changed files with 11 additions and 1 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in a new issue