diff --git a/src/layouts/Blogpost.astro b/src/layouts/Blogpost.astro
index 175b791..50feae7 100644
--- a/src/layouts/Blogpost.astro
+++ b/src/layouts/Blogpost.astro
@@ -1,16 +1,235 @@
---
+import Todo from "./Todo.astro";
import Markdown from "./Markdown.astro";
+import Error from "./Error.astro";
+import Icon from "../components/base/Icon.astro";
-const { frontmatter } = Astro.props;
+const props = Astro.props;
+
+// if frontmatter.link is not defined, use the current url as the author's link
+props.frontmatter.link = props.frontmatter.link || Astro.url;
+
+// get the last part of the url
+const url = Astro.url.pathname.split("/").pop();
+
+const headings = Astro.props.headings || [];
-// if draft, it will 404
-if (frontmatter.draft) {
- return Astro.redirect('/404');
-}
---
-
-
-
+{
+ props.frontmatter.draft ?
+
+ Sorry, the page `{Astro.url}` is in draft mode.
+
+ :
+
+