diff --git a/app/routes/blog.$file.tsx b/app/routes/blog.$file.tsx index 44d753c..f9fd2e2 100644 --- a/app/routes/blog.$file.tsx +++ b/app/routes/blog.$file.tsx @@ -49,10 +49,10 @@ export const meta: MetaFunction = ({ data }) => { export default function Post() { const { code, - frontmatter: { title, published }, + frontmatter: { title, date }, file, } = useLoaderData(); - const formattedDate = useFormattedDate(published); + const formattedDate = useFormattedDate(date); const MdxComponent = React.useMemo(() => getMDXComponent(code), [code]); return ( diff --git a/app/utils/posts.server.ts b/app/utils/posts.server.ts index e198e5e..24a4d26 100644 --- a/app/utils/posts.server.ts +++ b/app/utils/posts.server.ts @@ -1,12 +1,12 @@ import { remarkCodeHike } from "@code-hike/mdx"; import { bundleMDX } from "mdx-bundler"; -import { readdir, readFile } from "node:fs/promises"; +import { readFile, readdir } from "node:fs/promises"; import path from "node:path"; type FrontMatter = { title: string; description: string; - published: Date; + date: Date; isFeatured: boolean; }; @@ -68,7 +68,7 @@ export const findPosts = async () => { posts.push({ ...frontmatter, filename: file.replace(".mdx", ""), - published: frontmatter.published.toISOString(), + published: frontmatter.date.toISOString(), }); } diff --git a/posts/helloworld.mdx b/posts/helloworld.mdx index e605379..200b270 100644 --- a/posts/helloworld.mdx +++ b/posts/helloworld.mdx @@ -1,6 +1,6 @@ --- title: Hello, world -published: 2023-03-15 +date: 2023-03-15 description: The hello world post --- diff --git a/posts/how_this_site_is_built.mdx b/posts/how_this_site_is_built.mdx index a4abffe..22360e2 100644 --- a/posts/how_this_site_is_built.mdx +++ b/posts/how_this_site_is_built.mdx @@ -1,6 +1,6 @@ --- title: How this site is built -published: 2024-09-29 +date: 2024-09-29 description: A technical explanation of how this site works --- diff --git a/posts/run_shopify_app_without_appbridge.mdx b/posts/run_shopify_app_without_appbridge.mdx index df3d58f..a020639 100644 --- a/posts/run_shopify_app_without_appbridge.mdx +++ b/posts/run_shopify_app_without_appbridge.mdx @@ -1,6 +1,6 @@ --- title: Run Shopify App without the App Bridge -published: 2024-10-07 +date: 2024-10-07 description: Let's get rid of Shopify's app bridge. ---