Add social media & SEO meta tags

This commit is contained in:
Sat Naing
2022-09-08 20:57:24 +06:30
parent 3d1b24fc36
commit 2ffd37cb25
+19 -10
View File
@@ -14,12 +14,21 @@ const { title } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{title}</title> <title>{title}</title>
<!-- meta tags for social media & SEO -->
<meta name="author" content="Sat Naing" />
<meta name="description" content="custom_description" />
<meta property="og:title" content="og_title" />
<meta property="og:description" content="og_description" />
<meta property="og:image" content="/some-image.png" />
<meta property="og:url" content="/this-page.html" />
<meta property="og:site_name" content="og_site_name" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image:alt" content="twitter_image_description" />
</head> </head>
<body> <body>
<slot /> <slot />
</body> <style>
</html>
<style>
:root { :root {
--font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem); --font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
--font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem); --font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem);
@@ -40,11 +49,9 @@ const { title } = Astro.props;
body { body {
margin: 0; margin: 0;
} }
</style>
<style is:global>
</style>
<style is:global>
h1 { h1 {
font-size: var(--font-size-xl); font-size: var(--font-size-xl);
} }
@@ -54,7 +61,9 @@ const { title } = Astro.props;
} }
code { code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
Bitstream Vera Sans Mono, Courier New, monospace; DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
} }
</style> </style>
</body>
</html>