+15
-9
src/pages/blog/[...slug].astro
+15
-9
src/pages/blog/[...slug].astro
···
3
3
import Base from "/components/Base.astro";
4
4
import { render } from "astro:content";
5
5
6
+
import "/components/markdown.css";
7
+
6
8
export async function getStaticPaths() {
7
9
return await Promise.all(
8
10
await getCollection("blog").then((posts) =>
···
32
34
image: banner,
33
35
}}
34
36
>
35
-
<img src={banner} alt="" />
36
-
<h1>{post.data.title}</h1>
37
-
<time
38
-
datetime={`${post.data.pub.getFullYear()}-${post.data.pub.getMonth()}-${post.data.pub.getDate()}`}
39
-
>{post.data.pub.getDate()}-{post.data.pub.getMonth()}-{
40
-
post.data.pub.getFullYear()
41
-
}</time
42
-
>
37
+
<header>
38
+
<img src={banner} alt="" />
39
+
<h1>{post.data.title}</h1>
40
+
<time
41
+
datetime={`${post.data.pub.getFullYear()}-${post.data.pub.getMonth()}-${post.data.pub.getDate()}`}
42
+
>{post.data.pub.getDate()}-{post.data.pub.getMonth()}-{
43
+
post.data.pub.getFullYear()
44
+
}</time
45
+
>
46
+
</header>
43
47
44
-
<Content />
48
+
<article>
49
+
<Content />
50
+
</article>
45
51
</Base>