项目
在 GitHub 查看
tomsoderlund/nextjs-multi-domain-locale
关于
Hosting multiple domains on the same Next.js site (while maintaining multiple languages and SSG)
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文nextjs-multi-domain-locale
Multiple domains and languages on the same Next.js site
This is an example of hosting multiple domains on the same Next.js site (while maintaining multiple languages and static site generation (SSG, getStaticProps)), using Next.js’ i18n system.
Demo
https://multi-domain-locale1.vercel.app/
Concept
- Domain mapped to Next.js’ i18n
localeis used to determine the site. - Language is instead handled via a
pseudoLocaleprop (pages inside a/[pseudoLocale]folder). - A redirect from
/to/en. - TODO: Automatic language detection using the Accept-Language header.
See next.config.js for setup.
探索相关项目
加载中…