set up Biome

This commit is contained in:
2025-10-28 17:17:41 -04:00
parent 5a5c72850d
commit a1ea385448
39 changed files with 2476 additions and 719 deletions
+5 -5
View File
@@ -1,12 +1,12 @@
---
import { getCollection, render } from 'astro:content';
import Layout from '@layouts/Layout.astro';
import BlogHeader from '@components/BlogHeader.astro';
import Tags from '@components/Tags.astro';
import { getCollection, render } from "astro:content";
import BlogHeader from "@components/BlogHeader.astro";
import Tags from "@components/Tags.astro";
import Layout from "@layouts/Layout.astro";
export async function getStaticPaths() {
const posts = await getCollection('blog');
const posts = await getCollection("blog");
return posts.map((post) => ({
params: { slug: post.id },
props: { post },
+5 -4
View File
@@ -1,9 +1,10 @@
---
import { getCollection, type CollectionEntry } from 'astro:content';
import type { Page } from 'astro';
import { type CollectionEntry, getCollection } from 'astro:content';
import PostPreview from '@components/PostPreview.astro';
import Layout from '@layouts/Layout.astro';
import PostPreview from '@components/PostPreview.astro';
import type { Page } from 'astro';
export async function getStaticPaths({ paginate }) {
const allPosts = await getCollection('blog');
@@ -52,8 +53,8 @@ const { page } = Astro.props;
.pagination {
display: flex;
justify-content: center;
margin-top: 2rem;
margin: auto;
margin-top: 2rem;
gap: 1rem;
}
+5 -5
View File
@@ -1,21 +1,21 @@
---
import { format, add } from 'date-fns';
import { getCollection } from 'astro:content';
import { getCollection } from 'astro:content';
import Layout from '@layouts/Layout.astro';
import { add, format } from 'date-fns';
export async function getStaticPaths() {
const posts = await getCollection('blog');
const tags = ['all'];
posts.forEach((post) =>
posts.forEach((post) => {
post.data.tags.forEach((tag) => {
if (!tags.includes(tag)) {
tags.push(tag);
}
})
);
});
});
return tags.map((tag) => ({
params: { tag },