hugo/layouts/shortcodes/gh.html
Bjørn Erik Pedersen dd78d5b23f Squashed 'docs/' content from commit 5d9a6703
git-subtree-dir: docs
git-subtree-split: 5d9a6703591c29283800d7b9e4c5c85981ed86d6
2017-06-26 20:46:06 +02:00

9 lines
328 B
HTML

{{ range .Params }}
{{ if eq (substr . 0 1) "@" }}
<a href="//github.com/{{ substr . 1 }}">{{ . }}</a>
{{ else if eq (substr . 0 2) "0x" }}
<a href="//github.com/gohugoio/hugo/commit/{{ substr . 2 }}">{{ substr . 2 6 }}</a>
{{ else }}
<a href="//github.com/gohugoio/hugo/issues/{{ . }}">#{{ . }}</a>
{{ end }}
{{ end }}