{title}
++
diff --git a/src/content/blog/initial-blog.mdx b/src/content/blog/initial-blog.mdx index e3d00eb..eaf0af3 100644 --- a/src/content/blog/initial-blog.mdx +++ b/src/content/blog/initial-blog.mdx @@ -2,6 +2,8 @@ title: 'First post' description: 'First post of this website that tests many things' pubDate: '2024-10-26' +updatedDate: '2024-10-27' +file-name: 'initial-blog.mdx' --- @@ -50,7 +52,9 @@ This is inline latex: $cos (2\theta) = \cos^2 \theta - \sin^2 \theta$ This is standalone latex -$$\lim\limits_{x \to \infty} \exp(-x) = 0$$ +$$ +\lim\limits_{x \to \infty} \exp(-x) = 0 +$$ Python code example diff --git a/src/content/config.ts b/src/content/config.ts index 667a31c..0905202 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -9,6 +9,7 @@ const blog = defineCollection({ // Transform string to Date object pubDate: z.coerce.date(), updatedDate: z.coerce.date().optional(), + filename: z.string().optional(), heroImage: z.string().optional(), }), }); diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro index 79c0774..3ba5a0a 100644 --- a/src/layouts/BlogPost.astro +++ b/src/layouts/BlogPost.astro @@ -1,49 +1,86 @@ --- - import "../styles/global.css"; import Header from "../components/Header.astro"; import Footer from "../components/Footer.astro"; import Metadata from "../components/Metadata.astro"; -import FormattedDate from '../components/FormattedDate.astro'; -import type { CollectionEntry } from 'astro:content'; +import FormattedDate from "../components/FormattedDate.astro"; +import type { CollectionEntry } from "astro:content"; -type Props = CollectionEntry<'blog'>['data']; +type Props = CollectionEntry<"blog">["data"]; + +const { title, description, pubDate, updatedDate, filename, heroImage } = Astro.props; + +const commitHistoryUrl = "https://github.com/osbm/osbm.dev/commits/main/src/content/blog/" + filename; -const { title, description, pubDate, updatedDate, heroImage } = Astro.props; --- - - + -
-