Skip to content

Commit 1455a43

Browse files
chrstngynchrstngyn
chrstngyn
authored and
chrstngyn
committed
docs: add comments to markdown render hook
refs #280
1 parent 9ad06a9 commit 1455a43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
<!--
2+
create hook for links that adds target=_blank to external links ending in .pdf
3+
for any external pdf links, open the pdf to a new tab
4+
https://gohugo.io/getting-started/configuration-markup/#link-with-title-markdown-example
5+
-->
16
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if (strings.HasSuffix .Destination ".pdf") }} target="_blank"{{ end }}>{{ .Text }}</a>

0 commit comments

Comments
 (0)