From d4c5b29f3d1e1389a46093f00f86efc290678c8c Mon Sep 17 00:00:00 2001 From: bitbloxhub <45184892+bitbloxhub@users.noreply.github.com> Date: Sat, 22 Jul 2023 12:01:26 -0700 Subject: [PATCH] a blog? --- src/components/Card.astro | 63 -------------------------- src/layouts/MarkdownPostLayout.astro | 7 +++ src/pages/index.astro | 68 +--------------------------- src/pages/posts/first-post.md | 11 +++++ 4 files changed, 20 insertions(+), 129 deletions(-) delete mode 100644 src/components/Card.astro create mode 100644 src/layouts/MarkdownPostLayout.astro create mode 100644 src/pages/posts/first-post.md diff --git a/src/components/Card.astro b/src/components/Card.astro deleted file mode 100644 index 200b041..0000000 --- a/src/components/Card.astro +++ /dev/null @@ -1,63 +0,0 @@ ---- -interface Props { - title: string - body: string - href: string -} - -const { href, title, body } = Astro.props ---- - - - diff --git a/src/layouts/MarkdownPostLayout.astro b/src/layouts/MarkdownPostLayout.astro new file mode 100644 index 0000000..cc718e2 --- /dev/null +++ b/src/layouts/MarkdownPostLayout.astro @@ -0,0 +1,7 @@ +--- +const { frontmatter } = Astro.props; +--- +

{frontmatter.title}

+

Written by {frontmatter.author}

+

Published {frontmatter.pubDate}

+ \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 1ce3f43..040efae 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,81 +1,17 @@ --- import Layout from "../layouts/Layout.astro" -import Card from "../components/Card.astro" --- -
-

Welcome to Astro

-

- To get started, open the directory src/pages in your project.
- Code Challenge: Tweak the "Welcome to Astro" message above. -

- +
+

Welcome to bitbloxhub's website

diff --git a/src/pages/posts/first-post.md b/src/pages/posts/first-post.md new file mode 100644 index 0000000..17da948 --- /dev/null +++ b/src/pages/posts/first-post.md @@ -0,0 +1,11 @@ +--- +layout: ../../layouts/MarkdownPostLayout.astro +title: "I have a new blog!" +pubDate: 2023-07-22 +description: "This is the first post of my new blog." +author: "bitbloxhub" +image: + url: "https://docs.astro.build/assets/full-logo-light.png" + alt: "The full Astro logo." +--- +Welcome to my new blog i have built using astro! \ No newline at end of file