summaryrefslogtreecommitdiff
path: root/layouts/_markup
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_markup')
-rw-r--r--layouts/_markup/render-image.html1
-rw-r--r--layouts/_markup/render-link.html3
2 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_markup/render-image.html b/layouts/_markup/render-image.html
new file mode 100644
index 0000000..590c9bf
--- /dev/null
+++ b/layouts/_markup/render-image.html
@@ -0,0 +1 @@
+<img src="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} alt="{{ .Text }}" referrerpolicy="no-referrer" loading="lazy"> \ No newline at end of file
diff --git a/layouts/_markup/render-link.html b/layouts/_markup/render-link.html
new file mode 100644
index 0000000..8fb3c26
--- /dev/null
+++ b/layouts/_markup/render-link.html
@@ -0,0 +1,3 @@
+{{ $emoji := cond (and (not (.Page.Params.makerefs | default true)) (.Page.Params.showlinkemoji | default true)) (emojify ":link: ") "" -}}
+{{ $isExternalLink := (urls.Parse .Destination).IsAbs -}}
+{{ $emoji }}<a class="link {{ if $isExternalLink }}link--external{{ else }}link--internal{{ end }}" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }} rel="{{ if $isExternalLink }}external {{ end }}noreferrer">{{ .Text }}</a> \ No newline at end of file