{frontmatter.title}
Written by {frontmatter.author}
-Published on {frontmatter.pubDate.slice(0,10)}
+Published on {frontmatter.pubDate.toISOString().slice(0,10)}
Approximately {frontmatter.minutesRead}
From d4ec4bf9ec7529b749e4106a726e58889784c1bb Mon Sep 17 00:00:00 2001 From: bitbloxhub <45184892+bitbloxhub@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:38:17 -0700 Subject: [PATCH] content collections! --- .vscode/settings.json | 3 +++ src/components/BlogPost.astro | 2 +- .../posts => content/blog}/first-post.mdx | 1 - src/content/config.ts | 16 ++++++++++++++++ src/env.d.ts | 1 + src/layouts/MarkdownPostLayout.astro | 2 +- src/pages/blog.astro | 5 +++-- src/pages/posts/[...slug].astro | 17 +++++++++++++++++ 8 files changed, 42 insertions(+), 5 deletions(-) rename src/{pages/posts => content/blog}/first-post.mdx (79%) create mode 100644 src/content/config.ts create mode 100644 src/pages/posts/[...slug].astro diff --git a/.vscode/settings.json b/.vscode/settings.json index 2fba78f..9dd3763 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,8 @@ { "yaml.schemas": { "https://json.schemastore.org/github-workflow.json": "file:///mnt/wd-blue-2tb/home/jonahgam/bitbloxhub.github.io/.github/workflows/deploy.yaml" + }, + "files.associations": { + "*.mdx": "markdown" } } \ No newline at end of file diff --git a/src/components/BlogPost.astro b/src/components/BlogPost.astro index a745809..ef75df1 100644 --- a/src/components/BlogPost.astro +++ b/src/components/BlogPost.astro @@ -4,5 +4,5 @@ const { title, url, minutesRead, pubDate } = Astro.props
Written by {frontmatter.author}
-Published on {frontmatter.pubDate.slice(0,10)}
+Published on {frontmatter.pubDate.toISOString().slice(0,10)}
Approximately {frontmatter.minutesRead}