diff options
author | Dan Hersam <dan@hersam.com> | 2015-12-14 22:20:06 +0300 |
---|---|---|
committer | Dan Hersam <dan@hersam.com> | 2015-12-14 22:20:06 +0300 |
commit | 7243aee63d4a6bef3b6a1ab49c4b98679c272996 (patch) | |
tree | 6509415e1fa347b54518230b2d32401003ab3d7c | |
parent | 8f2cdc087f9a6d82f7f764c7a2b7e6077032cb1f (diff) |
Added gist partial to illustrate getJSON.
-rw-r--r-- | layouts/partials/gists.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/layouts/partials/gists.html b/layouts/partials/gists.html new file mode 100644 index 0000000..cae7cfa --- /dev/null +++ b/layouts/partials/gists.html @@ -0,0 +1,13 @@ +<aside id="categories-3" class="widget widget_categories"> + + <h1 class="widget-title">Recent Gists</h1> + + <ul> + {{ $gists := getJSON "https://api.github.com/users/spf13/gists" }} + {{ range first 5 $gists }} + <li><a href="{{ .html_url }}" target="_blank">{{ with .description }}{{ . }}{{ else }}(No description){{end}}</a></li> + {{ end }} + + </ul> + +</aside>
\ No newline at end of file |