with one click
corp-web-japan-events-mdx-webinar-migration
// Implement `/t/events` plus MDX-backed local event routes in corp-web-japan by importing the Japanese webinar corpus from corp-web-contents.
// Implement `/t/events` plus MDX-backed local event routes in corp-web-japan by importing the Japanese webinar corpus from corp-web-contents.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | corp-web-japan-events-mdx-webinar-migration |
| description | Implement `/t/events` plus MDX-backed local event routes in corp-web-japan by importing the Japanese webinar corpus from corp-web-contents. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["corp-web-japan","events","webinars","mdx","migration","nextjs"],"related_skills":["corp-web-japan-origin-main-worktree-safety","corp-web-japan-local-whitepaper-detail-route","blog-posting","whitepaper-posting"]}} |
Use this when the user wants corp-web-japan events to work like the local blog/whitepaper MDX flows, especially with a preview list at /t/events and source content imported from ../corp-web-contents/pages/features/demo/webinars/**/ja/content.mdx.
/events list launch-gated unless the user explicitly asks to un-gate it/t/events as a non-indexed preview list page/events/:id/:slug from local checked-in MDX under src/content/events/*.mdx/events/:id canonical redirect routepublic/events/<id>/thumbnail.pngMirror the local blog/whitepaper structure:
src/content/events/<id>.mdxsrc/content/publications/event-publication-records.tssrc/lib/publications/get-event-publication-post.tssrc/app/events/[id]/[slug]/page.tsxsrc/app/events/[id]/page.tsxsrc/app/t/events/page.tsxpublic/events/<id>/thumbnail.pngKeep src/app/events/page.tsx as the launch-gated public list route, but switch its items source to the MDX-derived event list.
Japanese webinar source files currently live at:
../corp-web-contents/pages/features/demo/webinars/<id>/<slug>/ja/content.mdxThe representative hero image usually comes from frontmatter:
ogImage: "public/webinar/<file>.png"Copy that file to:
public/events/<id>/thumbnail.pngUse a blog/whitepaper-like shape:
---
id: "27"
slug: "air-company-ai-agent-security-webinar"
title: "..."
description: "..."
date: "2026-04-09"
eventDate: "2026-04-16"
heroImageSrc: "/events/27/thumbnail.png"
eventLabel: "ウェビナー"
hideHeroImageOnDetail: true
author: "querypie"
relatedIds:
- "26"
- "25"
- "24"
---
Notes:
id as a stringeventLabel is the single event-type badge shown on /t/events; use values like イベント, ウェビナー, ワークショップ, or 研修hideHeroImageOnDetail: true hides the top hero image only on the detail page; omit it or set false to keep the current default renderingイベント when eventLabel is omitteddate contract used by the local event corpus: ISO yyyy-mm-dd string for the posting/publish dateeventDate should also use ISO yyyy-mm-dd, but only when the source/local MDX body explicitly states a concrete scheduled date日時:YYYY年M月D日 or 日付: YYYY年M月D日, derive eventDate from that scheduled dateeventDate merely by copying date when the body does not state a concrete scheduled dateeventDateeventDate as optional in the frontmatter type, and timeline/list classification may use an effective date helper like record.eventDate ?? record.datedate; but the presence of frontmatter eventDate itself should only be asserted for entries whose body explicitly states that scheduled daterelatedPosts legacy webinar paths into relatedIdsauthor: "querypie" unless a different local author is explicitly neededWhen importing from corp-web-contents webinar MDX:
filepath="public/webinar/..." to filepath="public/events/<id>/thumbnail.png"<Box center><ArticleFileImage filepath="public/webinar/..." ... /></Box>
remove that duplicate block, because the page shell already renders heroImageSrc<br /> noise left by the sourcepublic/webinar//features/demo/webinars/The webinar corpus may use these components:
ArticleYoutubeGatingFormEmailLinkButtonLinkBoxArticleFileImageLocal support rules:
ArticleYoutubeGatingForm can be a thin pass-through wrapper to the existing Youtube componentEmailLink should render a simple mailto: linkButtonLink, Box, and ArticleFileImage registered in the publication MDX component mapevent-publication-records.ts
src/content/events/*.mdxgetPublicationHref("event", id, slug)イベントget-event-publication-post.ts
record.sourcePathrenderPublicationMdxextractHeadingsFromMdxresolveArticleAuthorsrelatedIdsgetEventPublicationPost(id) and getEventPublicationHref(id, slug)Important:
/events/[id]/[slug]idrecord.redirectUrl exists, redirect there before any local slug handling or MDX renderingslug mismatches the canonical sluggetEventPublicationPost(id)/events/:id/:slugrecord.redirectUrl exists, return only robots: { index: false, follow: false } metadata, matching the blog/news/whitepaper shadow-record contractrobots as index: false, follow: false/events/[id]idrecord.redirectUrl exists, redirect there directly/events/:id/:slugDo not stop at the detail route. In this repo, a latent bug can appear when detail routes honor redirectUrl but list cards or related-item builders still generate the local canonical href.
For event work, verify all three surfaces together:
Reusable rule that turned out to matter across the whole MDX publication family:
record.redirectUrl ?? localCanonicalHrefrecord.redirectUrl ?? localCanonicalHrefresolveRedirectablePublicationHref(redirectUrl, fallbackHref), reuse it across blog, whitepaper, news, use-cases, AIP demo, ACP demo, and events so list/detail/related behavior stays aligned/t/eventslistEventPublicationItems()/t/eventsnoindex, nofollowsrc/content/resources/events.tssrc/app/events/[id]/[slug]/page.tsxsrc/app/events/[id]/page.tsxsrc/app/t/events/page.tsxsrc/lib/publications/mdx/components.tsxsrc/content/events/public/events/tests/At minimum:
routing/preview test
/t/events exists and uses listEventPublicationItems()/events/[id] redirects canonically/events/[id]/[slug] loads by id and redirects only on slug mismatchrenderPublicationMdx and extractHeadingsFromMdximported corpus test
heroImageSrc: "/events/<id>/thumbnail.png"public/webinar/ references remain/features/demo/webinars/ references remaincomponent support test
ArticleYoutubeGatingForm and EmailLink are registered in the MDX components mapLightweight local verification that worked well:
node --test tests/events-mdx-routing-and-preview.test.mjs tests/events-imported-ja-corpus.test.mjs
npx tsc --noEmit --pretty false
Then complete the normal git workflow:
origin/maingh pr checks until all checks finishid and slug while parsing source pathssrc/lib/resource-posts.tsheroImageSrcArticleYoutubeGatingForm or EmailLink, which can break imported webinar MDX rendering/events list when the user only asked for /t/events/t/events exists and is non-indexed/events/:id/:slug renders local MDX/events/:id redirects canonicallysrc/content/events/*.mdxpublic/events/<id>/thumbnail.png