@@ -33,7 +33,7 @@ const { Content } = await post.render();
3333const ogImageUrl = typeof ogImage === " string" ? ogImage : ogImage ?.src ;
3434const ogUrl = new URL (
3535 ogImageUrl ?? ` /posts/${slugifyStr (title )}.png ` ,
36- Astro .url .origin
36+ Astro .url .origin ,
3737).href ;
3838
3939const layoutProps = {
@@ -54,7 +54,7 @@ const allPosts = posts.map(({ data: { title }, slug }) => ({
5454 title ,
5555}));
5656
57- const currentPostIndex = allPosts .findIndex (a => a .slug === post .slug );
57+ const currentPostIndex = allPosts .findIndex (( a ) => a .slug === post .slug );
5858
5959const prevPost = currentPostIndex !== 0 ? allPosts [currentPostIndex - 1 ] : null ;
6060const nextPost =
@@ -77,7 +77,9 @@ const nextPost =
7777 </button >
7878 </div >
7979 <main id =" main-content" >
80- <h1 transition:name ={ slugifyStr (title )} class =" post-title inline-block" >{ title } </h1 >
80+ <h1 transition:name ={ slugifyStr (title )} class =" post-title inline-block" >
81+ { title }
82+ </h1 >
8183 <Datetime
8284 pubDatetime ={ pubDatetime }
8385 modDatetime ={ modDatetime }
@@ -86,12 +88,16 @@ const nextPost =
8688 editPost ={ editPost }
8789 postId ={ post .id }
8890 />
89- <article id =" article" class =" prose mx-auto mt-8 max-w-5xl" >
91+ <article
92+ id =" article"
93+ class =" prose mx-auto mt-8 max-w-5xl"
94+ style =" color: var(--color-text-base)"
95+ >
9096 <Content />
9197 </article >
9298
9399 <ul class =" my-8" >
94- { tags .map (tag => <Tag tag = { slugifyStr (tag )} />)}
100+ { tags .map (( tag ) => <Tag tag = { slugifyStr (tag )} />)}
95101 </ul >
96102
97103 <div
@@ -236,7 +242,7 @@ const nextPost =
236242 * allowing sharing of sections easily */
237243 function addHeadingLinks() {
238244 const headings = Array.from(
239- document.querySelectorAll("h2, h3, h4, h5, h6")
245+ document.querySelectorAll("h2, h3, h4, h5, h6"),
240246 );
241247 for (const heading of headings) {
242248 heading.classList.add("group");
@@ -308,6 +314,6 @@ const nextPost =
308314
309315 /* Go to page start after page swap */
310316 document.addEventListener("astro:after-swap", () =>
311- window.scrollTo({ left: 0, top: 0, behavior: "instant" })
317+ window.scrollTo({ left: 0, top: 0, behavior: "instant" }),
312318 );
313319</script >
0 commit comments