Get gist link and description from api too
This commit is contained in:
parent
35d289f36e
commit
4465ef3af5
5 changed files with 11 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Astrill Extractor
|
||||
gist: https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c
|
||||
gist: 050da86871fb952ba7bfe97eece8555c
|
||||
---
|
||||
|
||||
Astrill, my VPN of choice, allows you to export OpenVPN config files for all it's VPNs, allowing you to connect on platforms it doesn't provide clients for, which albeit isn't many. The AUR package `astrill` has started becoming really unstable on my machine recently, so I decided to switch it out for `ovpn` files, as gnome has excellent support for OpenVPN.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Morse code decoder
|
||||
gist: https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834
|
||||
gist: 6dc94875c93b787e5834
|
||||
subtitle: A JSON file to help decode morse-code
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Wiki Game solver
|
||||
gist: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be
|
||||
gist: 7da9a3dd1bf90ecdf7be
|
||||
subtitle: Simple script to win the Wiki Game
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
<h2>{{ title .Title }}</h2>
|
||||
{{ if .Params.subtitle }}
|
||||
<p>{{ markdownify .Params.subtitle }}</p>
|
||||
{{ else if .Params.repo }}
|
||||
{{ $data := getJSON "https://api.github.com/repos/" .Params.repo }}
|
||||
<p>{{ $data.description }}</p>
|
||||
{{ else if .Params.gist }}
|
||||
{{ $data := getJSON "https://api.github.com/gists/" .Params.gist }}
|
||||
<p>{{ $data.description }}</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ if .Content }}
|
||||
|
|
|
@ -1,23 +1,7 @@
|
|||
{{ partial "page_start.html" . }}
|
||||
<div id="page-wrapper">
|
||||
<section id="main" class="container">
|
||||
<header>
|
||||
<h2>{{ title .Title }}</h2>
|
||||
{{ if .Params.subtitle }}
|
||||
<p>{{ markdownify .Params.subtitle }}</p>
|
||||
{{ else if .Params.repo }}
|
||||
{{ $data := getJSON "https://api.github.com/repos/" .Params.repo }}
|
||||
<p>{{ $data.description }}</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ if .Content }}
|
||||
<div class="box">
|
||||
{{ if .Params.image }}
|
||||
<span class="image featured main" data-image="{{ .Params.image }}"></span>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ partial "content.html" . }}
|
||||
<div class="box">
|
||||
<ul class="actions fir">
|
||||
{{ if .Params.download_url }}
|
||||
|
@ -28,7 +12,7 @@
|
|||
<li><a class="button special fit" href="{{ $data.html_url }}"><i class="fa fa-github fa-lg"></i> View Source</a></li>
|
||||
{{ end }}
|
||||
{{ if .Params.gist }}
|
||||
{{ $data := getJSON "https://api.github.com/repos/" .Params.repo }}
|
||||
{{ $data := getJSON "https://api.github.com/gists/" .Params.gist }}
|
||||
<li><a class="button special fit" href="{{ $data.html_url }}"><i class="fa fa-github fa-lg"></i> View Source</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue