diff --git a/src/components/Button.astro b/src/components/Button.astro index d6a950e..494a8c0 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -9,8 +9,8 @@ interface Props { const { href, variant = "text", title, class: className = "" } = Astro.props; const baseClasses = - "border-transparent inline-block border-b-2 p-2 cursor-pointer hover:border-neutral-300 hover:bg-neutral-100 hover:dark:border-neutral-600 hover:dark:bg-neutral-700"; -const classes = `${baseClasses} ${variant === "icon" && href ? "inline-grid place-content-center" : ""} ${className}`; + "border-transparent border-b-2 p-2 cursor-pointer hover:border-neutral-300 hover:bg-neutral-100 hover:dark:border-neutral-600 hover:dark:bg-neutral-700"; +const classes = `${baseClasses} ${variant === "icon" && href ? "inline-grid place-content-center" : "inline-block"} ${className}`; --- { diff --git a/src/components/TableOfContents.astro b/src/components/TableOfContents.astro index 49a06fe..6032e37 100644 --- a/src/components/TableOfContents.astro +++ b/src/components/TableOfContents.astro @@ -27,14 +27,14 @@ const { headings } = Astro.props; headings.length ? ( headings .filter(({ depth }) => depth === 2) - .map((heading) => ( + .map(({ slug, text }) => (
  • - {heading.text} + {text}
  • )) diff --git a/src/pages/blog/[slug].astro b/src/pages/blog/[slug].astro index 5991616..18c5757 100644 --- a/src/pages/blog/[slug].astro +++ b/src/pages/blog/[slug].astro @@ -18,16 +18,12 @@ if (!article) { throw new Error(); } +const { title, description, pubDate, modDate } = article.data; + const { Content, headings } = await render(article); --- - + diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 8b91675..d2cba24 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -15,15 +15,12 @@ const sortedArticles = allArticles.sort((a, b) => { >