summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 16:54:01 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-15 16:54:01 +0200
commit19c9544e1db6512fbf2dab975f7ec96983854875 (patch)
treea18e230100a7af2b6780e1f5faea9f92cda8e01a /layouts
parentb3588987080d7998ca18467b9d9fb10be06dfe15 (diff)
downloadgohugo-theme-ed-19c9544e1db6512fbf2dab975f7ec96983854875.tar.gz
Add link shortcode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/link.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/layouts/shortcodes/link.html b/layouts/shortcodes/link.html
new file mode 100644
index 0000000..362ce94
--- /dev/null
+++ b/layouts/shortcodes/link.html
@@ -0,0 +1,3 @@
+<a href="{{ .Get 0 | absURL }}" {{- with .Get "title" }} title="{{.}}"{{ end }} {{- with .Get "class" }} class="{{.}}"{{ end }} {{- with .Get "target" }} target="{{.}}"{{ end }} {{- with .Get "rel" }} rel="{{.}}"{{ end }}>
+ {{ .Inner }}
+</a>