mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
commands: Make sure all language homes are always re-rendered in fast render mode
Fixes #4125
This commit is contained in:
@@ -215,6 +215,23 @@ func (p *PathSpec) getLanguagePrefix() string {
|
||||
return currentLang
|
||||
}
|
||||
|
||||
// GetLangSubDir returns the given language's subdir if needed.
|
||||
func (p *PathSpec) GetLangSubDir(lang string) string {
|
||||
if !p.multilingual {
|
||||
return ""
|
||||
}
|
||||
|
||||
if p.languages.IsMultihost() {
|
||||
return ""
|
||||
}
|
||||
|
||||
if lang == "" || (lang == p.defaultContentLanguage && !p.defaultContentLanguageInSubdir) {
|
||||
return ""
|
||||
}
|
||||
|
||||
return lang
|
||||
}
|
||||
|
||||
// IsAbsURL determines whether the given path points to an absolute URL.
|
||||
func IsAbsURL(path string) bool {
|
||||
url, err := url.Parse(path)
|
||||
|
Reference in New Issue
Block a user