1
Fork 0

Get gist link and description from api too

This commit is contained in:
Jake Howard 2017-07-04 09:13:46 +01:00
parent 35d289f36e
commit 4465ef3af5
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 11 additions and 21 deletions

View file

@ -1,6 +1,6 @@
--- ---
title: Astrill Extractor 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. 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.

View file

@ -1,6 +1,6 @@
--- ---
title: Morse code decoder title: Morse code decoder
gist: https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834 gist: 6dc94875c93b787e5834
subtitle: A JSON file to help decode morse-code subtitle: A JSON file to help decode morse-code
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Wiki Game solver title: Wiki Game solver
gist: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be gist: 7da9a3dd1bf90ecdf7be
subtitle: Simple script to win the Wiki Game subtitle: Simple script to win the Wiki Game
--- ---

View file

@ -2,6 +2,12 @@
<h2>{{ title .Title }}</h2> <h2>{{ title .Title }}</h2>
{{ if .Params.subtitle }} {{ if .Params.subtitle }}
<p>{{ markdownify .Params.subtitle }}</p> <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 }} {{ end }}
</header> </header>
{{ if .Content }} {{ if .Content }}

View file

@ -1,23 +1,7 @@
{{ partial "page_start.html" . }} {{ partial "page_start.html" . }}
<div id="page-wrapper"> <div id="page-wrapper">
<section id="main" class="container"> <section id="main" class="container">
<header> {{ partial "content.html" . }}
<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 }}
<div class="box"> <div class="box">
<ul class="actions fir"> <ul class="actions fir">
{{ if .Params.download_url }} {{ 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> <li><a class="button special fit" href="{{ $data.html_url }}"><i class="fa fa-github fa-lg"></i> View Source</a></li>
{{ end }} {{ end }}
{{ if .Params.gist }} {{ 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> <li><a class="button special fit" href="{{ $data.html_url }}"><i class="fa fa-github fa-lg"></i> View Source</a></li>
{{ end }} {{ end }}
</ul> </ul>