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,16 +1,15 @@
---
import { getCollection } from 'astro:content';
import { IconStar } from '@tabler/icons-react';
import { fetchGlobals } from "@data/globals.js";
import { fetchAllPosts } from "@data/posts.js";
import Layout from "@layouts/Layout.astro";
import Paginator from '@components/nav/Paginator.astro';
import { md } from '@utils/helpers.js';
import { DateTime } from 'luxon';
const globals = await fetchGlobals();
const posts = await fetchAllPosts();
const { page } = Astro.props;
const { globals } = Astro.locals;
const currentUrl = Astro.url.pathname;
const currentPage = Astro.params.page ? parseInt(Astro.params.page, 10) : 1;