diff --git a/src/components/base/Head.astro b/src/components/base/Head.astro index 0e3aa3a..d1577ea 100644 --- a/src/components/base/Head.astro +++ b/src/components/base/Head.astro @@ -1,8 +1,20 @@ +--- +import type { Maybe } from 'purify-ts'; + +interface Props { + title: Maybe; +} + +const { + title, +} = Astro.props; +--- -Kamoshi.org +{title.mapOrDefault(title => `${title} | kamoshi.org`, "kamoshi.org")} + diff --git a/src/layouts/Article.astro b/src/layouts/Article.astro deleted file mode 100644 index 08a1074..0000000 --- a/src/layouts/Article.astro +++ /dev/null @@ -1,38 +0,0 @@ ---- -import dayjs from "dayjs"; -import Base from "./Base.astro"; -import Header from "../components/headers/Article.astro"; -import Toc from "../components/Toc.astro"; - -interface Props { - headings?: any[], - frontmatter: { - title: string; - date: string; - tags: string[]; - } -} - -const { - headings, - frontmatter: { - title, - date, - tags, -}} = Astro.props; ---- - -
- -
-
-
- -
-
-
- diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 5e55e44..9ba6c5d 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -3,9 +3,19 @@ import '../styles/styles.scss'; import Head from "../components/base/Head.astro"; import Header from "../components/base/Header.astro"; import Footer from "../components/base/Footer.astro"; +import { Maybe } from 'purify-ts'; + + +interface Props { + title?: string; +} + +const { + title, +} = Astro.props; --- - +