From 194818504ee43d07f8885d09ac20eff011b70678 Mon Sep 17 00:00:00 2001 From: furedea <132188853+furedea@users.noreply.github.com> Date: Mon, 19 Oct 2026 16:10:42 +0900 Subject: [PATCH] feat: split publications and activities with dated programs Publications now lists papers only, and a new Activities section shows talks, programs, and study abroad with optional end dates and localized type labels. The former News records are renamed to activities throughout the code and content. Refs #76 Co-Authored-By: Claude Opus 5.5 --- README.md | 4 +- .../aspire_summit_2026.yaml | 0 content/activities/fukuoka_mitou_2023.yaml | 7 +++ content/activities/q2pec_2024.yaml | 7 +++ content/publications/ss2026_27.yaml | 2 +- src/components/activities_section.astro | 39 ++++++++++++++ ...{news_entry.astro => activity_entry.astro} | 17 ++++--- src/components/publications_section.astro | 19 +------ src/data/activities.ts | 12 +++++ src/data/news.ts | 11 ---- src/data/sections.ts | 1 + src/data/site_record_schema.test.ts | 28 ++++++++-- src/data/site_record_schema.ts | 17 ++++--- src/data/site_records.test.ts | 28 ++++++---- src/data/site_records.ts | 28 +++++++--- src/i18n/ui.ts | 26 ++++++++-- src/pages/[lang]/index.astro | 2 + tests/e2e/site.spec.ts | 51 +++++++++++++++---- 18 files changed, 218 insertions(+), 81 deletions(-) rename content/{news => activities}/aspire_summit_2026.yaml (100%) create mode 100644 content/activities/fukuoka_mitou_2023.yaml create mode 100644 content/activities/q2pec_2024.yaml create mode 100644 src/components/activities_section.astro rename src/components/{news_entry.astro => activity_entry.astro} (71%) create mode 100644 src/data/activities.ts delete mode 100644 src/data/news.ts diff --git a/README.md b/README.md index a58dc9c..3febd31 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ creates a missing post, updates a different post, and leaves an identical post u - `articles/`: Zenn-compatible Japanese articles - `article_config.json`: non-secret publishing destination settings - `images/`: images shared by Zenn, esa exports, and the website -- `content/news/`: standalone bilingual news records -- `content/publications/`: bilingual publication records and their optional News announcements +- `content/activities/`: standalone bilingual activity records +- `content/publications/`: bilingual publication records and their optional activity announcements - `src/data/`: typed profile, research, education, and content transformation code - `public/`: files copied directly into the production build diff --git a/content/news/aspire_summit_2026.yaml b/content/activities/aspire_summit_2026.yaml similarity index 100% rename from content/news/aspire_summit_2026.yaml rename to content/activities/aspire_summit_2026.yaml diff --git a/content/activities/fukuoka_mitou_2023.yaml b/content/activities/fukuoka_mitou_2023.yaml new file mode 100644 index 0000000..d24600b --- /dev/null +++ b/content/activities/fukuoka_mitou_2023.yaml @@ -0,0 +1,7 @@ +date: "2023-11-01" +endDate: "2024-01-31" +title: + ja: "福岡未踏 Solve に採択され,LLM-chatbot をチームで開発しました." + en: "Selected for Fukuoka Mitou (Solve) and built LLM-chatbot with a team." +url: "https://note.com/mitou_fukuoka/n/n397fe44895c6" +type: "program" diff --git a/content/activities/q2pec_2024.yaml b/content/activities/q2pec_2024.yaml new file mode 100644 index 0000000..5040d2e --- /dev/null +++ b/content/activities/q2pec_2024.yaml @@ -0,0 +1,7 @@ +date: "2024-08-16" +endDate: "2024-09-23" +title: + ja: "九州大学工学部の短期留学プログラム Q²PEC で,クイーンズランド大学(オーストラリア)に滞在しました." + en: "Studied at the University of Queensland, Australia, through Kyushu University's Q²PEC short-term program." +url: "https://www.eng.kyushu-u.ac.jp/programs/program-q2pec/" +type: "study-abroad" diff --git a/content/publications/ss2026_27.yaml b/content/publications/ss2026_27.yaml index 4d165ab..7c9553d 100644 --- a/content/publications/ss2026_27.yaml +++ b/content/publications/ss2026_27.yaml @@ -15,7 +15,7 @@ year: 2026 type: "technical-report" peerReviewed: false url: "https://ken.ieice.org/ken/paper/202607247cwN/" -news: +activity: date: "2026-07-24" title: ja: "SIGSS 2026年7月研究会で研究発表を行いました." diff --git a/src/components/activities_section.astro b/src/components/activities_section.astro new file mode 100644 index 0000000..86b2ad9 --- /dev/null +++ b/src/components/activities_section.astro @@ -0,0 +1,39 @@ +--- +import type { Lang } from "@i18n/ui"; +import { useTranslations } from "@i18n/utils"; +import { getActivities } from "@data/activities"; +import Section from "./section.astro"; +import ActivityEntry from "./activity_entry.astro"; + +interface Props { + lang: Lang; +} + +const { lang } = Astro.props; +const t = useTranslations(lang); +const activities = await getActivities(); +--- + +
+ { + activities.length > 0 ? ( + + ) : ( +

{t("activities.empty")}

+ ) + } +
+ + diff --git a/src/components/news_entry.astro b/src/components/activity_entry.astro similarity index 71% rename from src/components/news_entry.astro rename to src/components/activity_entry.astro index f0a429a..93a70ba 100644 --- a/src/components/news_entry.astro +++ b/src/components/activity_entry.astro @@ -1,26 +1,27 @@ --- import type { Lang } from "@i18n/ui"; -import type { NewsItem } from "@data/news"; -import { pickLocale } from "@i18n/utils"; +import { formatActivityPeriod, type Activity } from "@data/activities"; +import { pickLocale, useTranslations } from "@i18n/utils"; import OptionalLink from "./optional_link.astro"; interface Props { - item: NewsItem; + item: Activity; lang: Lang; } const { item, lang } = Astro.props; +const t = useTranslations(lang); const title = pickLocale(item.title, lang); --- -
  • - - {item.type} +
  • + + {t(`activity.type.${item.type}`)} {title}