mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-25 02:46:59 +08:00
Rebuilds the site using Astro (SSG) with Tailwind CSS v4, replacing the Jekyll/Cayman theme. Key changes: - Splits the monolithic /rules page into 110 statically-generated pages (92 per-service + 13 group index + homepage + guide pages) for SEO - URL structure: /rules/[group-slug]/[service-slug]/ with backward- compatibility redirect map for old anchor-based URLs (/rules#redis) - Modern UI: Prometheus-orange accent, dark mode (system + toggle), sticky sidebar, responsive layout, copy-to-clipboard per rule/section - SEO: per-page <title>, <meta description>, Open Graph, Twitter Card, canonical URLs, sitemap.xml via @astrojs/sitemap - GEO: FAQPage JSON-LD schema on each service page (rules as Q&A pairs for AI search engines), TechArticle schema, BreadcrumbList - Search: Pagefind (build-time index, lazy-loaded, ~200KB) - Zero JS by default; copy buttons and theme toggle use inline scripts - New CI: .github/workflows/deploy.yml builds Astro + Pagefind and deploys to GitHub Pages via actions/deploy-pages - Existing dist.yml and test.yml workflows are untouched - _data/rules.yml remains the single source of truth Note: GitHub Pages source must be changed from "Build from branch" (Jekyll) to "GitHub Actions" in repository settings.
27 lines
1.1 KiB
Text
27 lines
1.1 KiB
Text
---
|
|
import { getTotalRuleCount, getTotalServiceCount, getTotalExporterCount, data } from '../data/rules';
|
|
|
|
const totalRules = getTotalRuleCount();
|
|
const totalServices = getTotalServiceCount();
|
|
const totalExporters = getTotalExporterCount();
|
|
const totalGroups = data.groups.length;
|
|
---
|
|
|
|
<div class="flex flex-wrap justify-center gap-6 sm:gap-10 py-4 text-center">
|
|
<div>
|
|
<div class="text-2xl font-bold text-brand dark:text-brand-dark">{totalRules}</div>
|
|
<div class="text-xs text-slate-500 dark:text-slate-400 mt-0.5">alert rules</div>
|
|
</div>
|
|
<div>
|
|
<div class="text-2xl font-bold text-brand dark:text-brand-dark">{totalServices}</div>
|
|
<div class="text-xs text-slate-500 dark:text-slate-400 mt-0.5">services</div>
|
|
</div>
|
|
<div>
|
|
<div class="text-2xl font-bold text-brand dark:text-brand-dark">{totalExporters}</div>
|
|
<div class="text-xs text-slate-500 dark:text-slate-400 mt-0.5">exporters</div>
|
|
</div>
|
|
<div>
|
|
<div class="text-2xl font-bold text-brand dark:text-brand-dark">{totalGroups}</div>
|
|
<div class="text-xs text-slate-500 dark:text-slate-400 mt-0.5">categories</div>
|
|
</div>
|
|
</div>
|