Closed CyrusYip closed 2 years ago
I solved this issue by putting defaultContentLanguageInSubdir = "true"
above [permalinks]
. If it does not work, you can put it at top of config.toml
.
googleAnalytics = "" # UA-XXXXXXXX-X
copyright = "" # default: author.name ↓ # 默认为下面配置的author.name ↓
+defaultContentLanguageInSubdir = "true" # Render English site under /en
[permalinks]
post = "/post/:year/:month/:day/:slug/"
# language support # en / zh-cn / other... translations present in i18n/
I am trying to build a bilingual site. English is default language, another language is Simplified Chinese. The URL of Chinese site is prefixed with
zh-ch
.However, the URL of default language(English) site is not prefixed with
en
.How can I make the URL of the default site prefixed with its language code(en)? I want to make it look like this: