Skip to content

Commit e8f42cc

Browse files
committed
feat: add title to pages
1 parent 9d01b71 commit e8f42cc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/components/MDContainer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Box, Container } from "styled-system/jsx";
44
import { GridPattern } from "./mystic/GridPattern";
55
66
interface Props {
7-
class?: string;
7+
class?: string;
88
}
99
1010
const { class: className } = Astro.props;

src/pages/blog/[slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const post = entry.data;
2929
const content = await getPostHTML(slug);
3030
---
3131

32-
<BaseLayout>
32+
<BaseLayout title={`${post.title} | TheComputerM's Blog`}>
3333
<Fragment slot="head">
3434
<link
3535
rel="stylesheet"

src/pages/blog/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import BaseLayout from "~/layouts/BaseLayout.astro";
55
const posts = await getCollection("blog");
66
---
77

8-
<BaseLayout>
8+
<BaseLayout title="TheComputerM's Blog">
99
<MDContainer>
1010
<h1>Blog</h1>
1111
<ul>

src/pages/index.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getEntry, render } from "astro:content";
33
import MDContainer from "src/components/MDContainer.astro";
44
import { Center, Stack } from "styled-system/jsx";
5-
import Layout from "~/layouts/BaseLayout.astro";
5+
import BaseLayout from "~/layouts/BaseLayout.astro";
66
const entry = await getEntry("pages", "index");
77
88
if (!entry) {
@@ -12,7 +12,7 @@ if (!entry) {
1212
const { Content } = await render(entry);
1313
---
1414

15-
<Layout>
15+
<BaseLayout title="TheComputerM | Mudit Somani">
1616
<Center class="banner">
1717
<Stack align="center">
1818
<h1 class="title">TCM</h1>
@@ -21,7 +21,7 @@ const { Content } = await render(entry);
2121
<MDContainer>
2222
<Content />
2323
</MDContainer>
24-
</Layout>
24+
</BaseLayout>
2525

2626
<style>
2727
.title {

0 commit comments

Comments
 (0)