Add gh shortcode to docs site

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.
This commit is contained in:
Cameron Moore
2015-11-25 09:01:22 -06:00
committed by Anthony Fok
parent d48781badf
commit 6812229bb8
2 changed files with 61 additions and 64 deletions

View File

@@ -0,0 +1,7 @@
{{ 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 }}