add carbon rating

This commit is contained in:
2024-06-21 15:57:11 -04:00
parent 74c54b996e
commit 98c1a85f21
5 changed files with 12 additions and 31 deletions
+2 -3
View File
@@ -1,20 +1,19 @@
---
import { format, add } from 'date-fns';
import { getCollection } from 'astro:content';
import { Tag as TagEnum } from '../../types';
import Layout from '@layouts/Layout.astro';
export const prerender = false;
const { tag }: { tag?: TagEnum } = Astro.params;
const { tag }: { tag?: string } = Astro.params;
const posts = await getCollection('blog', ({ data }) => {
if (!tag) {
return false;
}
if (tag === TagEnum.all) {
if (tag === 'all') {
return true;
}