Skip to content

Commit

Permalink
Merge pull request #111 from AVAnnotate/lwj/hide-home-on-home
Browse files Browse the repository at this point in the history
Hide home in ToC on home page
  • Loading branch information
lwjameson authored Nov 18, 2024
2 parents df37362 + 6783cbf commit 2416055
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/TableOfContents.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ if (!homePage) {
---

<div class='py-4 flex flex-col gap-2'>
<a class='underline' href={`/${baseUrl || ''}`}>
{homePage.data.title}
</a>
{
![`/${baseUrl}/`, '/'].includes(Astro.url.pathname) && (
<a class='underline' href={`/${baseUrl || ''}`}>
{homePage.data.title}
</a>
)
}
{
pages
.filter((page) => page.id !== homePage.id)
Expand Down

0 comments on commit 2416055

Please sign in to comment.