diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-28 12:05:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 12:05:37 +0300 |
commit | aa48df5eddf17e220e1f2cfd84538399a14249d2 (patch) | |
tree | f14ce1b94f856bd99b369bcd4064e925ff9cdc8e /layouts/posts | |
parent | 0c1f7d0ef82636e0e699fa7799f4dd5497ed1322 (diff) |
feat(content): support complete local resource references (#388)
Diffstat (limited to 'layouts/posts')
-rw-r--r-- | layouts/posts/single.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 86b60bf..8f788a2 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -33,7 +33,7 @@ {{- $author := $params.author | default .Site.Author.name | default (T "author") -}} {{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}} <span class="post-author"> - {{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}} + {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}} {{- partial "plugin/link.html" $options -}} </span> @@ -64,9 +64,13 @@ </div> {{- /* Featured image */ -}} - {{- with $params.featuredimage -}} + {{- $image := $params.featuredimage -}} + {{- with .Resources.GetMatch "featured-image" -}} + {{- $image = .RelPermalink -}} + {{- end -}} + {{- with $image -}} <div class="featured-image"> - {{- dict "src" . "alt" $.Description "large" true | partial "plugin/image.html" -}} + {{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}} </div> {{- end -}} |