diff --git a/app/blog/[slug]/loading.tsx b/app/blog/[slug]/loading.tsx index dcb2cbe..c0fd35d 100644 --- a/app/blog/[slug]/loading.tsx +++ b/app/blog/[slug]/loading.tsx @@ -1,15 +1,22 @@ +const lineWidths = ['78%', '92%', '85%', '88%', '74%', '96%', '82%', '69%']; + export default function BlogPostLoading() { return ( -
,
- pre: (props: React.ComponentPropsWithoutRef<'pre'>) => ,
- a: (props: React.ComponentPropsWithoutRef<'a'>) => ,
+ h1: (props: React.ComponentPropsWithoutRef<'h1'>) => ,
+ h2: (props: React.ComponentPropsWithoutRef<'h2'>) => ,
+ h3: (props: React.ComponentPropsWithoutRef<'h3'>) => ,
+ p: (props: React.ComponentPropsWithoutRef<'p'>) => ,
+ ul: (props: React.ComponentPropsWithoutRef<'ul'>) => ,
+ pre: (props: React.ComponentPropsWithoutRef<'pre'>) => ,
+ a: (props: React.ComponentPropsWithoutRef<'a'>) => ,
SideNote,
Citation,
Bibliography,
@@ -82,7 +80,6 @@ export default async function BlogPost({ params }: Props) {
notFound();
}
- // Extract headings for TOC
const headingLines = post.content.match(/^#{2,3}\s+(.+)$/gm) || [];
const headings = headingLines.map((line) => {
const level = line.match(/^#+/)?.[0].length || 2;
@@ -90,47 +87,40 @@ export default async function BlogPost({ params }: Props) {
const id = slugify(text);
return { id, text, level };
});
+ const tags = Array.isArray(post.metadata.tags) ? post.metadata.tags : [];
return (
-