From 90cdcf66f599f424faaf2bb22e4adae6713b71d9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 9 Jul 2017 21:55:23 +0100 Subject: [PATCH] get gist id from page params --- content/projects/astrill-extractor.md | 2 +- content/projects/morse-code-decoder.md | 2 +- content/projects/wiki-game-solver.md | 2 +- layouts/shortcodes/gist.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/projects/astrill-extractor.md b/content/projects/astrill-extractor.md index 347372b..d454328 100644 --- a/content/projects/astrill-extractor.md +++ b/content/projects/astrill-extractor.md @@ -7,7 +7,7 @@ Astrill, my VPN of choice, allows you to export OpenVPN config files for all it' The export step is really simple, you just login to the web portal, create an entry for your machine, and export the config files. Their tutorial for this can be found [here](http://wiki.astrill.com/index.php/Astrill_Setup_Manual:How_to_configure_OpenVPN_with_Network_Manager_on_Linux). The only problem is that some applications won't accept the certificates embedded into the file like astrill provide. (Gnome does, but I only realised that whilst writing this). -{{% gist 050da86871fb952ba7bfe97eece8555c %}} +{{% gist %}} The above script will split out the files and save them into separate directories for each config file. These files can then be imported and used in an openvpn-compatable application. diff --git a/content/projects/morse-code-decoder.md b/content/projects/morse-code-decoder.md index bff9202..8216d3e 100644 --- a/content/projects/morse-code-decoder.md +++ b/content/projects/morse-code-decoder.md @@ -14,4 +14,4 @@ In order to make it accessible for as many people in as many different languages The source of the library is on GitHub as a gist. I recommend downloading the file to use yourself, however for testing you can use GitHub's raw file as a hotlink. -{{% gist 6dc94875c93b787e5834 %}} +{{% gist %}} diff --git a/content/projects/wiki-game-solver.md b/content/projects/wiki-game-solver.md index 5e0669b..4d93bcc 100644 --- a/content/projects/wiki-game-solver.md +++ b/content/projects/wiki-game-solver.md @@ -28,7 +28,7 @@ With this, I started to write something that would change the location of the if ### Source The source for this was written in pure JS, and relies heavily on the fact that the wiki game uses jQuery so I can plug into components and events really easily. The code can be found in the GitHub gists below. Both the standard and compact versions are available. -{{% gist 7da9a3dd1bf90ecdf7be %}} +{{% gist %}} ### Disclaimer As I experienced whilst developing this, the people that play Wiki Game don't tend to like people cheating. There were a lot of people getting very annoyed whilst I was developing and testing. So please use this at your own risk! At the moment I don't think there is any kind of banning system, but be warned! diff --git a/layouts/shortcodes/gist.html b/layouts/shortcodes/gist.html index 63f1734..c75d0d3 100644 --- a/layouts/shortcodes/gist.html +++ b/layouts/shortcodes/gist.html @@ -1,3 +1,3 @@ -{{ $id := .Get 0 }} +{{ $id := default (.Get 0) .Page.Params.gist }} {{ $data := getJSON "https://api.github.com/gists/" $id }}