From 9ff85a80afe19b85518ada67f09245662b9a2926 Mon Sep 17 00:00:00 2001 From: Aaron Yarborough <3855819+AaronJY@users.noreply.github.com> Date: Sat, 29 Mar 2025 14:55:42 +0000 Subject: [PATCH] feat: rejig tag page --- package.json | 2 +- src/components/Article/Article.jsx | 2 +- src/pages/tags/index.js | 50 +++++++++++++----------------- 3 files changed, 23 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 6a826e1..d803e59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "www-aaronjy-me", - "version": "1.7.0.1", + "version": "1.7.1.0", "private": true, "type": "module", "scripts": { diff --git a/src/components/Article/Article.jsx b/src/components/Article/Article.jsx index e05c2a3..e1f2219 100644 --- a/src/components/Article/Article.jsx +++ b/src/components/Article/Article.jsx @@ -30,7 +30,7 @@ function Article ({ attributes, html }) { Back... {attributes.pubdate &&
{formatDate(attributes.pubdate)}
} - {attributes.tags &&Tags: {attributes.tags}
} + {attributes.tags &&Tags: {attributes.tags.join(', ')}
} > diff --git a/src/pages/tags/index.js b/src/pages/tags/index.js index 2313b31..31854b5 100644 --- a/src/pages/tags/index.js +++ b/src/pages/tags/index.js @@ -2,6 +2,7 @@ import DefaultLayout from '@/layouts/DefaultLayout/DefaultLayout' import { getContentTags, getStaticEntries } from '@/lib/content' import { NextSeo } from 'next-seo' import Link from 'next/link' +import React from 'react' export const getStaticProps = () => ({ props: { @@ -13,8 +14,6 @@ export const getStaticProps = () => ({ export const Title = 'Tags' export default function Tags ({ tags, postEntries }) { - const tagNames = Object.keys(tags).sort() - return (Tag | -Posts | -
---|---|
{tag} ({posts.length}) | -
- {posts && posts.map(post => {
- return (
- {post.attributes.title}
- )
- })}
- |
-