mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
6812229bb8
The `gh` shortcode has two modes: users and issues. For user mode, pass a list of `@username` arguments. For the issues/PR mode, pass a list of issue or PR numbers. PRs link to the "issues/" URL since Github redirects to the correct URL. Thanks to @ryanclarke for suggesting an improved template.
7 lines
201 B
HTML
7 lines
201 B
HTML
{{ range .Params }}
|
|
{{ if eq (substr . 0 1) "@" }}
|
|
<a href="//github.com/{{ substr . 1 }}">{{ . }}</a>
|
|
{{ else }}
|
|
<a href="//github.com/spf13/hugo/issues/{{ . }}">{{ . }}</a>
|
|
{{ end }}
|
|
{{ end }}
|