diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index abac89f4..3c3b5fef 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -2,12 +2,12 @@ {{- if .Title | and .Text -}} {{- $linked := ne $params.lightgallery false -}}
- {{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true | partial "plugin/image.html" -}} + {{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- .Text | safeHTML -}}
{{- else -}} {{- $linked := (eq $params.lightgallery "force") | or ($params.lightgallery | and (ne .Title "")) -}} - {{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true | partial "plugin/image.html" -}} + {{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}} {{- end -}} diff --git a/layouts/partials/feed/rss.html b/layouts/partials/feed/rss.html index a4519933..3ae7086c 100644 --- a/layouts/partials/feed/rss.html +++ b/layouts/partials/feed/rss.html @@ -7,7 +7,6 @@ {{- $pages = $pages | first .Config.limit -}} {{- end -}} {{- $length := $pages.Len -}} -{{- /* TODO 文章内图片链接、分类、标签等处理 */ -}} {{- printf "" | safeHTML }} diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index 1add1a2d..944c6cf2 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.10-312b6363" -}} +{{- .Scratch.Set "version" "v0.3.10-5e1a7845" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html index d7ffaed2..d128a13c 100644 --- a/layouts/partials/plugin/image.html +++ b/layouts/partials/plugin/image.html @@ -1,3 +1,4 @@ +{{- /* TODO refactor */ -}} {{- $params := partial "function/params.html" -}} {{- $class := .Class | default "" -}} {{- $style := "" -}} diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index 828b9ac2..fa0776f5 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -2,6 +2,7 @@ {{- $options = cond .IsNamedParams (.Get "alt") (.Get 1) | .Page.RenderString | dict "Alt" | merge $options -}} {{- $caption := cond .IsNamedParams (.Get "caption") (.Get 2) | .Page.RenderString -}} {{- $options = dict "Caption" $caption | merge $options -}} +{{- $options = dict "Resources" .Page.Resources | merge $options -}} {{- if .IsNamedParams -}} {{- $options = dict "Title" (.Get "title") | merge $options -}}