Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-28 12:05:37 +0300
committerGitHub <noreply@github.com>2020-05-28 12:05:37 +0300
commitaa48df5eddf17e220e1f2cfd84538399a14249d2 (patch)
treef14ce1b94f856bd99b369bcd4064e925ff9cdc8e /layouts/_default/_markup
parent0c1f7d0ef82636e0e699fa7799f4dd5497ed1322 (diff)
feat(content): support complete local resource references (#388)
Diffstat (limited to 'layouts/_default/_markup')
-rw-r--r--layouts/_default/_markup/render-image.html8
-rw-r--r--layouts/_default/_markup/render-link.html6
2 files changed, 9 insertions, 5 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index f1f016d..a79cddf 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,10 +1,10 @@
-{{- with .Title -}}
+{{- if .Title -}}
<figure>
- {{- dict "src" $.Destination "alt" $.Text "caption" . "linked" true | partial "plugin/image.html" -}}
+ {{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
<figcaption class="image-caption">
- {{- . | safeHTML -}}
+ {{- .Title | safeHTML -}}
</figcaption>
</figure>
{{- else -}}
- {{- dict "src" .Destination "alt" .Text | partial "plugin/image.html" -}}
+ {{- dict "Src" .Destination "Title" .Text "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- end -}}
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index 35e77e8..0c05396 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,2 +1,6 @@
-{{- $options := dict "href" .Destination "title" .Title "content" .Text -}}
+{{- $destination := .Destination -}}
+{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
+ {{- $destination = .RelPermalink -}}
+{{- end -}}
+{{- $options := dict "Destination" $destination "Title" .Title "Content" .Text -}}
{{- partial "plugin/link.html" $options -}}