added supabase

This commit is contained in:
Austin
2026-02-20 09:12:47 -06:00
parent 3c293159ff
commit 76f1241761
54 changed files with 3162 additions and 445 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
export const dynamic = "force-dynamic";
import ShareButtons from "@/components/ShareButtons";
import { getPostData, getSortedPostsData } from "@/lib/markdown";
import { getPostData, getSortedPostsData } from "@/lib/posts";
import { PostData, PostMetadata } from "@/types";
import { format } from "date-fns";
import Image from "next/image";
@@ -34,7 +36,7 @@ async function getPostAndMorePosts(
id: string,
): Promise<{ post: PostData; morePosts: PostMetadata[] }> {
const post = await getPostData(id);
const allPosts = getSortedPostsData();
const allPosts = await getSortedPostsData();
// Filter out the current post and get a few related posts (by tags)
const otherPosts = allPosts.filter((p) => p.id !== post.id);
+4 -2
View File
@@ -1,7 +1,9 @@
export const dynamic = 'force-dynamic';
import React from 'react';
import Link from 'next/link';
import { format } from 'date-fns';
import { getSortedPostsData } from '@/lib/markdown';
import { getSortedPostsData } from '@/lib/posts';
import { PostMetadata } from '@/types';
import { generateMetadata as createMetadata } from '@/components/Metadata';
import type { Metadata } from 'next';
@@ -16,7 +18,7 @@ export async function generateMetadata(): Promise<Metadata> {
}
async function getPostsAndYears(): Promise<{ posts: PostMetadata[]; years: number[] }> {
const posts = getSortedPostsData();
const posts = await getSortedPostsData();
// Extract unique years from post dates
const years = Array.from(new Set(