feat: seo优化
This commit is contained in:
BIN
src/assets/icon/logo.png
Normal file
BIN
src/assets/icon/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
@@ -6,6 +6,9 @@ import BaseFooter from "@/components/BaseFooter.astro";
|
||||
|
||||
import { metadata } from "@/consts.ts";
|
||||
const { siteTitle } = metadata;
|
||||
|
||||
const {title,description} = Astro.props;
|
||||
const pageTitle = title ? `${title} - ${siteTitle}` : siteTitle;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
@@ -18,7 +21,8 @@ const { siteTitle } = metadata;
|
||||
/>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{siteTitle}</title>
|
||||
<title>{pageTitle}</title>
|
||||
<meta name="description" content={description}>
|
||||
</head>
|
||||
<body>
|
||||
<BaseHeader />
|
||||
|
||||
@@ -25,7 +25,7 @@ const content = await highlightHtmlWithJsdom(data.content)
|
||||
data.published_at = formatDatetime(data.published_at, 'YYYY 年 M 月 D 日')
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Layout title={data.title} description={data.summary}>
|
||||
<h1 class="post-title">{data.title}</h1>
|
||||
|
||||
<div class="published-at">
|
||||
|
||||
Reference in New Issue
Block a user