add multilingual support

This commit is contained in:
geekifan
2025-04-27 16:17:45 +08:00
parent 1e0bb29742
commit 9c9f002965
18 changed files with 738 additions and 18 deletions

View File

@ -48,11 +48,8 @@
{{ if .Params.image }}
{{ $src := .Params.image.path | default .Params.image }}
{{ if not (findRE "//" $src) }}
{{ $media_subpath := .Params.media_subpath | default "" }}
{{ $src = path.Join $media_subpath $src }}
{{ $page_path := path.Dir .RelPermalink }}
{{ $src = path.Join $page_path $src }}
{{ $src = .Resources.GetMatch ( .Params.image.path | default .Params.image ) }}
{{ $src = $src.RelPermalink }}
{{ end }}
{{ $alt := .Params.image.alt | default "Preview Image" | htmlEscape }}