Add and wire extended site env config

This commit is contained in:
2025-11-17 16:51:59 +08:00
parent e64ec9a35d
commit 237bb083cd
7 changed files with 116 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ import { notFound } from 'next/navigation';
import type { Metadata } from 'next';
import { allPosts } from 'contentlayer/generated';
import { getPostBySlug } from '@/lib/posts';
import { siteConfig } from '@/lib/config';
export function generateStaticParams() {
return allPosts.map((post) => ({
@@ -44,7 +45,9 @@ export default function BlogPostPage({ params }: Props) {
)}
{post.published_at && (
<p className="text-xs text-gray-500">
{new Date(post.published_at).toLocaleDateString('zh-TW')}
{new Date(post.published_at).toLocaleDateString(
siteConfig.defaultLocale
)}
</p>
)}
{post.tags && (