mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-25 02:46:59 +08:00
Agent-Logs-Url: https://github.com/samber/awesome-prometheus-alerts/sessions/c85937ba-1855-4b8a-a72b-847eab1c8639 Co-authored-by: samber <2951285+samber@users.noreply.github.com>
100 lines
2.9 KiB
Text
100 lines
2.9 KiB
Text
---
|
|
import '../styles/global.css';
|
|
import Header from '../components/Header.astro';
|
|
import Footer from '../components/Footer.astro';
|
|
import SEO from '../components/SEO.astro';
|
|
import { SITE_ORIGIN, AUTHOR_NAME } from '../data/site';
|
|
|
|
interface Props {
|
|
title: string;
|
|
description?: string;
|
|
canonicalUrl?: string;
|
|
ogImage?: string;
|
|
ogType?: string;
|
|
keywords?: string;
|
|
jsonLd?: object | object[];
|
|
noIndex?: boolean;
|
|
datePublished?: string;
|
|
dateModified?: string;
|
|
}
|
|
|
|
const {
|
|
title,
|
|
description = 'Collection of alerting rules for Prometheus. Copy-pasteable Prometheus alert configurations for 90+ services.',
|
|
canonicalUrl,
|
|
ogImage,
|
|
ogType,
|
|
keywords,
|
|
jsonLd,
|
|
noIndex = false,
|
|
datePublished,
|
|
dateModified,
|
|
} = Astro.props;
|
|
|
|
const base = import.meta.env.BASE_URL.replace(/\/$/, '');
|
|
const canonical = canonicalUrl ?? `${SITE_ORIGIN}${base}${Astro.url.pathname.replace(base, '')}`;
|
|
---
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en" class="">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="theme-color" content="#E6522C" />
|
|
<meta name="author" content={AUTHOR_NAME} />
|
|
{noIndex && <meta name="robots" content="noindex" />}
|
|
|
|
<SEO
|
|
title={title}
|
|
description={description}
|
|
canonicalUrl={canonical}
|
|
ogImage={ogImage}
|
|
ogType={ogType}
|
|
keywords={keywords}
|
|
jsonLd={jsonLd}
|
|
base={base}
|
|
siteUrl={SITE_ORIGIN}
|
|
datePublished={datePublished}
|
|
dateModified={dateModified}
|
|
/>
|
|
|
|
<link rel="preconnect" href="https://www.googletagmanager.com" />
|
|
<link rel="dns-prefetch" href="https://www.googletagmanager.com" />
|
|
|
|
<link rel="icon" type="image/svg+xml" href={`${base}/favicon.svg`} />
|
|
<link rel="icon" type="image/x-icon" href={`${base}/favicon.ico`} />
|
|
<link rel="manifest" href={`${base}/manifest.json`} />
|
|
|
|
<!-- Dark mode: set class before paint to avoid flash -->
|
|
<script is:inline>
|
|
(function() {
|
|
var theme = localStorage.getItem('theme');
|
|
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
document.documentElement.classList.add('dark');
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<!-- Google Analytics 4 -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-GDF25KKVNL"></script>
|
|
<script is:inline>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){ dataLayer.push(arguments); }
|
|
gtag('js', new Date());
|
|
gtag('config', 'G-GDF25KKVNL');
|
|
</script>
|
|
</head>
|
|
<body class="min-h-screen flex flex-col bg-white dark:bg-slate-950 text-slate-900 dark:text-slate-100 transition-colors duration-150">
|
|
<a href="#main-content" class="sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-brand text-white px-3 py-1 rounded z-50">
|
|
Skip to main content
|
|
</a>
|
|
|
|
<Header base={base} />
|
|
|
|
<main id="main-content" class="flex-1">
|
|
<slot />
|
|
</main>
|
|
|
|
<Footer base={base} />
|
|
</body>
|
|
</html>
|