summaryrefslogtreecommitdiff
path: root/src/pages/blogs
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-12 18:44:51 +0200
committerKyren223 <Kyren223@proton.me>2024-11-12 18:44:51 +0200
commit506d97a7d16fa186beee3eda314492d9297e90c5 (patch)
tree2b9a7f333255caf11690d2234f88847017611507 /src/pages/blogs
parent0c17d94c4d1303d73b3ad3e7a9dfef1fb8f0a883 (diff)
Added blog and changed some other stuff
Diffstat (limited to 'src/pages/blogs')
-rw-r--r--src/pages/blogs/[...slug].astro31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/pages/blogs/[...slug].astro b/src/pages/blogs/[...slug].astro
index 417d1a6..37e6f53 100644
--- a/src/pages/blogs/[...slug].astro
+++ b/src/pages/blogs/[...slug].astro
@@ -1,32 +1,19 @@
---
-import Markdown from "../../components/MarkdownB.astro";
+import Blog from "../../layouts/Blog.astro";
import { getCollection } from "astro:content";
export async function getStaticPaths() {
- const blogEntries = await getCollection("blogs");
- return blogEntries.map((entry) => ({
- params: { slug: entry.slug },
- props: { entry },
- }));
+ const blogEntries = await getCollection("blogs");
+ return blogEntries.map((entry) => ({
+ params: { slug: entry.slug },
+ props: { entry },
+ }));
}
const { entry } = Astro.props;
const { Content } = await entry.render();
---
-<!doctype html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="description" content="Astro description" />
- <meta name="viewport" content="width=device-width" />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <meta name="generator" content={Astro.generator} />
- <title>Test</title>
- </head>
- <body>
- <main>
- <Markdown><Content /></Markdown>
- </main>
- </body>
-</html>
+<Blog title=`/home/kyren/blogs/${entry.slug}`>
+ <Content />
+</Blog>