mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
feat: add dynamic descript to meta head (#56)
* feat: add dynamic descript to meta head * revert code
This commit is contained in:
@@ -12,9 +12,10 @@ import {profileConfig, siteConfig} from "@/config";
|
||||
interface Props {
|
||||
title: string;
|
||||
banner: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
let { title, banner } = Astro.props;
|
||||
let { title, banner, description } = Astro.props;
|
||||
|
||||
const isHomePage = pathsEqual(Astro.url.pathname, '/');
|
||||
|
||||
@@ -70,7 +71,7 @@ if (title) {
|
||||
<title>{pageTitle}</title>
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content="Astro description">
|
||||
<meta name="description" content={description || pageTitle}>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="icon" media="(prefers-color-scheme: light)" href="/favicon/favicon-light-32.png" sizes="32x32">
|
||||
|
||||
@@ -10,15 +10,16 @@ import {siteConfig} from "@/config";
|
||||
interface Props {
|
||||
title: string;
|
||||
banner?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const { title, banner } = Astro.props
|
||||
const { title, banner, description } = Astro.props
|
||||
const isHomePage = pathsEqual(Astro.url.pathname, '/')
|
||||
const enableBanner = siteConfig.banner.enable
|
||||
|
||||
---
|
||||
|
||||
<Layout title={title} banner={banner}>
|
||||
<Layout title={title} banner={banner} description={description}>
|
||||
<div class="max-w-[var(--page-width)] min-h-screen grid grid-cols-[17.5rem_auto] grid-rows-[auto_auto_1fr_auto] lg:grid-rows-[auto_1fr_auto]
|
||||
mx-auto gap-4 relative px-0 md:px-4"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user