added support for multilingual 404 page redirects
This commit is contained in:
13
exampleSite/config/development/server.toml
Normal file
13
exampleSite/config/development/server.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
# defaultContentLanguageInSubdir must be true for this to work.
|
||||
|
||||
# Other languages redirects
|
||||
# [[redirects]]
|
||||
# from = '/fr/**'
|
||||
# to = '/fr/404.html'
|
||||
# status = 404
|
||||
|
||||
# Default language must be last.
|
||||
[[redirects]]
|
||||
from = '/**'
|
||||
to = '/en/404.html'
|
||||
status = 404
|
||||
@@ -17,7 +17,7 @@ disableLanguages = [
|
||||
hasCJKLanguage = false # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage
|
||||
# default language
|
||||
defaultContentLanguage = 'en'
|
||||
defaultContentLanguageInSubdir = false
|
||||
defaultContentLanguageInSubdir = true
|
||||
|
||||
########################### Services #############################
|
||||
[services]
|
||||
|
||||
Reference in New Issue
Block a user