diff --git a/hugo/hugo-lecture/layouts/partials/archetypes/assignment/article.html b/hugo/hugo-lecture/layouts/partials/archetypes/assignment/article.html index b289ce4..32517c6 100644 --- a/hugo/hugo-lecture/layouts/partials/archetypes/assignment/article.html +++ b/hugo/hugo-lecture/layouts/partials/archetypes/assignment/article.html @@ -8,10 +8,6 @@ {{ $topic := .Page.File.TranslationBaseName }} {{ $schedule := .Site.Data.schedule }} -{{ if .Site.IsMultiLingual }} - {{ $data := index .Site.Data .Site.Language.Lang }} - {{ $schedule = $data.schedule }} -{{ end }} {{ $due := "" }} {{ range $schedule }} diff --git a/hugo/hugo-lecture/layouts/partials/assignments.html b/hugo/hugo-lecture/layouts/partials/assignments.html index 37ebfc8..3d12dff 100644 --- a/hugo/hugo-lecture/layouts/partials/assignments.html +++ b/hugo/hugo-lecture/layouts/partials/assignments.html @@ -1,9 +1,5 @@ {{ $assignments := .Params.assignments }} {{ $schedule := .Site.Data.schedule }} -{{ if .Site.IsMultiLingual }} - {{ $data := index .Site.Data .Site.Language.Lang }} - {{ $schedule = $data.schedule }} -{{ end }} {{ if $assignments }} diff --git a/hugo/hugo-lecture/layouts/partials/attachments.html b/hugo/hugo-lecture/layouts/partials/attachments.html index ff5671f..e2c5e58 100644 --- a/hugo/hugo-lecture/layouts/partials/attachments.html +++ b/hugo/hugo-lecture/layouts/partials/attachments.html @@ -17,23 +17,6 @@ {{ $url = printf "%s/%s" . $url }} {{ end }} {{ $url = $url | path.Clean | absURL }} - - {{ if $.Site.IsMultiLingual }} - {{/* - Hugo will include the current language code as subdir in the URL, but the - additional content (images, files, ...) will be placed in the default - language dir only. So the content will not be reachable using the correct - URL generated by Hugo, and we have to use the URL pointing to the default - language dir in all language variants. - - Replace the current language code in the path with the language code for the - default language, e.g. replace "/ma/" w/ "/ba/" in "path/ma/images/wuppie.png" - (result: "path/ba/images/wuppie.png"). - */}} - {{ $default_lang := printf "/%s/" (index $.Site.Languages 0).Lang }} - {{ $current_lang := printf "%s/" $.Site.LanguagePrefix }} - {{ $url = replace $url $current_lang $default_lang }} - {{ end }} {{ end }} {{ $c = printf "%s
  • %s
  • " $c ($url | safeURL) $n }} {{ end }} diff --git a/hugo/hugo-lecture/layouts/partials/favicon.html b/hugo/hugo-lecture/layouts/partials/favicon.html index 9f10b89..06bb4cd 100644 --- a/hugo/hugo-lecture/layouts/partials/favicon.html +++ b/hugo/hugo-lecture/layouts/partials/favicon.html @@ -1,10 +1,5 @@ {{- $assetBusting := not .Site.Params.disableAssetsBusting }} {{ $logo := "images/logo.png" }} - {{ if .Site.IsMultiLingual }} - {{ with (strings.TrimPrefix "/" .Site.LanguagePrefix) }} - {{ $logo = printf "images/logo.%s.png" . }} - {{ end }} - {{ end }} diff --git a/hugo/hugo-lecture/layouts/partials/logo.html b/hugo/hugo-lecture/layouts/partials/logo.html index 7af7912..fe5ef60 100644 --- a/hugo/hugo-lecture/layouts/partials/logo.html +++ b/hugo/hugo-lecture/layouts/partials/logo.html @@ -1,11 +1,5 @@ {{ $logo := "images/logo.png" }} -{{ if .Site.IsMultiLingual }} - {{ with (strings.TrimPrefix "/" .Site.LanguagePrefix) }} - {{ $logo = printf "images/logo.%s.png" . }} - {{ end }} -{{ end }} - diff --git a/hugo/hugo-lecture/layouts/shortcodes/img.html b/hugo/hugo-lecture/layouts/shortcodes/img.html index 97e6977..51051cd 100644 --- a/hugo/hugo-lecture/layouts/shortcodes/img.html +++ b/hugo/hugo-lecture/layouts/shortcodes/img.html @@ -14,23 +14,6 @@ {{ $src = printf "%s/%s" . $src }} {{ end }} {{ $src = $src | path.Clean | absURL }} - - {{ if $.Site.IsMultiLingual }} - {{/* - Hugo will include the current language code as subdir in the URL, but the - additional content (images, files, ...) will be placed in the default - language dir only. So the content will not be reachable using the correct - URL generated by Hugo, and we have to use the URL pointing to the default - language dir in all language variants. - - Replace the current language code in the path with the language code for the - default language, e.g. replace "/ma/" w/ "/ba/" in "path/ma/images/wuppie.png" - (result: "path/ba/images/wuppie.png"). - */}} - {{ $default_lang := printf "/%s/" (index $.Site.Languages 0).Lang }} - {{ $current_lang := printf "%s/" $.Site.LanguagePrefix }} - {{ $src = replace $src $current_lang $default_lang }} - {{ end }} {{ end }} {{/*