Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Restructure 'contents' directory and update routing #16

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

junkisai
Copy link
Member

@junkisai junkisai commented Oct 7, 2024

Summary

I have modified the directory structure under the 'contents' folder and updated the routing to enable multilingual support for the site.

Related Issue

Changes

feat: Restructure contents/posts directory for i18n support

Modify the directory structure under contents/posts to support multiple languages.

contents
└─ posts
   └─ [slug]
         ├─ ja.md
         └─ en.md

feat: Update page paths for i18n site deployment

I have implemented the routing to handle the following list of paths.

Testing

Other Information

@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 04:45 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 04:45 — with GitHub Actions Inactive
@junkisai junkisai self-assigned this Oct 7, 2024
@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 05:21 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 05:21 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 07:01 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 07:01 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 07:03 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 07:03 — with GitHub Actions Inactive
@junkisai junkisai changed the title I18n directory feat: Restructure 'contents' directory and update routing Oct 7, 2024
@junkisai junkisai marked this pull request as ready for review October 7, 2024 07:14
@junkisai junkisai requested review from a team, hoshinotsuyoshi, FunamaYukina, MH4GF and sasamuku and removed request for a team October 7, 2024 07:14
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost good!

frontend/apps/service-site/package.json Show resolved Hide resolved
)

return <TopCards posts={sortedPosts.slice(0, 14)} lang={lang} />
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits: Since the lang is only en or ja, it looks good to generateStaticParams and make it SSG.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to your comments, I was able to convert everything from a partially SSR state to fully SSG. 😄

feat: Add generateStaticParams for lang params

Before After
image image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🚀

frontend/apps/service-site/src/app/layout.tsx Show resolved Hide resolved
frontend/apps/service-site/src/app/posts/[slug]/page.tsx Outdated Show resolved Hide resolved
@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 08:22 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 08:22 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site October 7, 2024 08:24 — with GitHub Actions Inactive
@junkisai junkisai temporarily deployed to preview - service-site-storybook October 7, 2024 08:24 — with GitHub Actions Inactive
@junkisai junkisai requested a review from MH4GF October 7, 2024 08:26
Copy link
Member

@MH4GF MH4GF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 😄

@junkisai junkisai merged commit 675c0b4 into main Oct 7, 2024
6 checks passed
@junkisai junkisai deleted the i18n-directory branch October 7, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants