1
Fork 0

Get fallback description from github api

This commit is contained in:
Jake Howard 2017-07-04 09:07:15 +01:00
parent a0f30419c8
commit 35d289f36e
Signed by: jake
GPG key ID: 57AFB45680EDD477
7 changed files with 30 additions and 10 deletions

View file

@ -1,6 +1,6 @@
--- ---
title: Astrill Extractor title: Astrill Extractor
repo: https://gist.github.com/RealOrangeOne/050da86871fb952ba7bfe97eece8555c gist: https://gist.github.com/RealOrangeOne/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: Attack on blocks game title: Attack on blocks game
repo: https://github.com/RealOrangeOne/attack-on-blocks/ repo: RealOrangeOne/attack-on-blocks
download_link: https://github.com/RealOrangeOne/attack-on-blocks/archive/master.zip download_link: https://github.com/RealOrangeOne/attack-on-blocks/archive/master.zip
--- ---

View file

@ -1,7 +1,6 @@
--- ---
title: My Dotfiles title: My Dotfiles
repo: https://github.com/RealOrangeOne/dotfiles/ repo: RealOrangeOne/dotfiles
subtitle: How I set up my machines just the way I like them!
--- ---
### What are dotfiles? ### What are dotfiles?

View file

@ -1,6 +1,6 @@
--- ---
title: Morse code decoder title: Morse code decoder
repo: https://gist.github.com/RealOrangeOne/6dc94875c93b787e5834 gist: https://gist.github.com/RealOrangeOne/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
repo: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be gist: https://gist.github.com/RealOrangeOne/7da9a3dd1bf90ecdf7be
subtitle: Simple script to win the Wiki Game subtitle: Simple script to win the Wiki Game
--- ---

View file

@ -1,6 +1,6 @@
--- ---
title: Yoga Pal title: Yoga Pal
repo: https://github.com/RealOrangeOne/yoga-pal repo: RealOrangeOne/yoga-pal
subtitle: Control screen rotation, touch screen, and trackpad using the terminal subtitle: Control screen rotation, touch screen, and trackpad using the terminal
--- ---

View file

@ -1,14 +1,35 @@
{{ 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">
{{ partial "content.html" . }} <header>
<div class="box"> <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">
<ul class="actions fir"> <ul class="actions fir">
{{ if .Params.download_url }} {{ if .Params.download_url }}
<li><a class="button special fit" href="{{ .Params.download_url }}">Download {{ .Title }}</a></li> <li><a class="button special fit" href="{{ .Params.download_url }}">Download {{ .Title }}</a></li>
{{ end }} {{ end }}
{{ if .Params.repo }} {{ if .Params.repo }}
<li><a class="button special fit" href="{{ .Params.repo }}"><i class="fa fa-github fa-lg"></i> View Source</a></li> {{ $data := getJSON "https://api.github.com/repos/" .Params.repo }}
<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 }}
<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>
</div> </div>