diff --git a/src/components/FreeTemplate.astro b/src/components/FreeTemplate.astro new file mode 100644 index 0000000..8939f5d --- /dev/null +++ b/src/components/FreeTemplate.astro @@ -0,0 +1,17 @@ +--- + +--- + + + + + + + +

Get free template

+
diff --git a/src/pages/404.astro b/src/pages/404.astro index d4c9e58..438798b 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -9,19 +9,6 @@ const meta = { --- - - - - - - -

Get free template

-

404

Oops, something went wrong.

diff --git a/src/pages/blog/[...page].astro b/src/pages/blog/[...page].astro index defcdf5..c2820bd 100644 --- a/src/pages/blog/[...page].astro +++ b/src/pages/blog/[...page].astro @@ -165,19 +165,5 @@ const paginationProps = {
) } - - - - - - - -

Get free template

-
diff --git a/src/pages/categories/[category]/[...page].astro b/src/pages/categories/[category]/[...page].astro index 5dcac03..3d037bb 100644 --- a/src/pages/categories/[category]/[...page].astro +++ b/src/pages/categories/[category]/[...page].astro @@ -81,18 +81,5 @@ const paginationProps = { - - - - - - -

Get free template

-
- - + diff --git a/src/pages/categories/[category]/index.astro b/src/pages/categories/[category]/index.astro new file mode 100644 index 0000000..5f18ccc --- /dev/null +++ b/src/pages/categories/[category]/index.astro @@ -0,0 +1,58 @@ +--- +import Button from '@/components/Button.astro' +import PageLayout from '@/layouts/BaseLayout.astro' +import { getAllPosts, getUniqueCategoriesWithCount } from '@/utils' + +const allPosts = await getAllPosts() +const allCategories = getUniqueCategoriesWithCount(allPosts) + +const meta = { + description: "A list of all the topics I've written about in my posts", + title: 'All Categories' +} +--- + + +
+ + +

Categories

+ {allCategories.length === 0 &&

No posts yet.

} + + { + allCategories.length > 0 && ( +
    + {allCategories.map(([category, val]) => ( +
  • + + #{category} + + + - {val} post{val > 1 && 's'} + +
  • + ))} +
+ ) + } +
+
diff --git a/src/pages/categories/index.astro b/src/pages/categories/index.astro index 88ac652..5f18ccc 100644 --- a/src/pages/categories/index.astro +++ b/src/pages/categories/index.astro @@ -54,19 +54,5 @@ const meta = { ) } - - - - - - - -

Get free template

-
diff --git a/src/pages/index.astro b/src/pages/index.astro index 56f2915..3e38e60 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -34,19 +34,6 @@ const allPostsByDate = sortMDByDate(allPosts).slice(0, MAX_POSTS)

Lorem ipsum dolor

- - - - - - -

Get free template

-
- - - - - - -

Get free template

-
diff --git a/src/pages/tags/[tag]/[...page].astro b/src/pages/tags/[tag]/[...page].astro index 4971476..7960ad4 100644 --- a/src/pages/tags/[tag]/[...page].astro +++ b/src/pages/tags/[tag]/[...page].astro @@ -79,18 +79,5 @@ const paginationProps = { - - - - - - -

Get free template

-
diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index 70d363b..9a93c8e 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -54,19 +54,5 @@ const meta = { ) } - - - - - - - -

Get free template

-