chore: middleware

This commit is contained in:
Cory Dransfeldt 2024-11-17 09:08:15 -08:00
parent 45b6e113b5
commit 3ab6f77a69
No known key found for this signature in database
18 changed files with 180 additions and 36 deletions

View file

@ -1,11 +1,8 @@
---
import { IconStar } from "@tabler/icons-react";
import { fetchAllPosts } from "@data/posts.js";
import { fetchAnalyticsData } from "@data/analytics.js";
import { fetchGlobals } from "@data/globals.js";
import { fetchLinks } from "@data/links.js";
import { md } from '@utils/helpers.js';
import { getPopularPosts } from '@utils/getPopularPosts.js';
@ -41,14 +38,13 @@ export async function getStaticPaths() {
}
const { post } = Astro.props;
const { globals } = Astro.locals;
const { year, title } = Astro.params;
const globals = await fetchGlobals();
const currentUrl = Astro.url.pathname;
const htmlContent = md(post.content);
---
<Layout
globals={globals}
pageTitle={post.title}
description={post.description}
ogImage={post.open_graph_image}