From 9873423b4279d57eea546e9b2f638aa56ad3108a Mon Sep 17 00:00:00 2001
From: miyaji255 <84168445+miyaji255@users.noreply.github.com>
Date: Tue, 5 Dec 2023 23:17:19 +0900
Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=82=B0=E4=B8=80=E8=A6=A7=E3=81=A8?=
=?UTF-8?q?=E9=96=A2=E9=80=A3=E8=A8=98=E4=BA=8B=E3=82=92=E8=BF=BD=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/blog/BlogContent.astro | 9 +-
src/components/blog/BlogList.astro | 15 ++-
src/components/blog/BlogListItem.astro | 17 ++-
src/components/blog/RelatedBlogSection.astro | 16 +++
src/components/blog/tag/TagList.astro | 21 ++--
src/components/blog/tag/TagListItemCard.astro | 24 ++++
src/components/blog/tag/TagListSection.astro | 17 +++
src/components/blog/tag/TagSmallList.astro | 25 ++++
src/components/layout/nav/BlogNav.astro | 34 ++++++
src/content/_blog-statistics.ts | 110 ++++++++++++++++++
src/layouts/BlogLayout.astro | 2 +
src/pages/blog/articles/[slug]/index.astro | 4 +
src/pages/blog/index.astro | 2 +-
src/pages/blog/tags/index.astro | 25 ++++
src/utils/format-date.ts | 6 +
15 files changed, 292 insertions(+), 35 deletions(-)
create mode 100644 src/components/blog/RelatedBlogSection.astro
create mode 100644 src/components/blog/tag/TagListItemCard.astro
create mode 100644 src/components/blog/tag/TagListSection.astro
create mode 100644 src/components/blog/tag/TagSmallList.astro
create mode 100644 src/components/layout/nav/BlogNav.astro
create mode 100644 src/content/_blog-statistics.ts
create mode 100644 src/pages/blog/tags/index.astro
create mode 100644 src/utils/format-date.ts
diff --git a/src/components/blog/BlogContent.astro b/src/components/blog/BlogContent.astro
index a74bb37..4fbbb81 100644
--- a/src/components/blog/BlogContent.astro
+++ b/src/components/blog/BlogContent.astro
@@ -1,15 +1,12 @@
---
import { getEntries, type CollectionEntry, getEntry } from 'astro:content'
-import TagList from './tag/TagList.astro'
+import TagSmallList from './tag/TagSmallList.astro'
import AuthorIcon from './icon/AuthorIcon.astro'
+import { formatDate } from '@/utils/format-date'
interface Props {
blog: CollectionEntry<'blogs'>
}
-function formatDate(date: Date): string {
- return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
-}
-
const { blog } = Astro.props
const { data: blogMeta } = (await getEntry({
collection: 'blog-metas',
@@ -30,7 +27,7 @@ const { Content } = await blog.render()
>
{tag.data.name}
- -記事数 : {articleCount}
+{tag.data.name}
+ +