From 64d0aaa8b4e656fa69e496341ca07105e8242e8f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 21 Sep 2019 19:39:21 +0100 Subject: [PATCH] Add shortcode to get file from GitHub --- content/linux/x-pretty-qt.md | 9 +++++++++ content/netlify/_index.md | 3 --- layouts/shortcodes/github_file.html | 10 ++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 content/linux/x-pretty-qt.md delete mode 100644 content/netlify/_index.md create mode 100644 layouts/shortcodes/github_file.html diff --git a/content/linux/x-pretty-qt.md b/content/linux/x-pretty-qt.md new file mode 100644 index 0000000..7e2e93f --- /dev/null +++ b/content/linux/x-pretty-qt.md @@ -0,0 +1,9 @@ +--- +title: Patch `xsession` so QT looks nice +--- + +After writing [Make QT less ugly](https://theorangeone.net/posts/make-qt-less-ugly/), I switched to LightDM, which completely broke it. + +This is the patch for `/etc/lightdm/Xsession` to stop it overriding my tweaks. + +{{< github_file repo="realorangeone/dotfiles" path="files/xsession.patch" >}} diff --git a/content/netlify/_index.md b/content/netlify/_index.md deleted file mode 100644 index 0683e9a..0000000 --- a/content/netlify/_index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Netlify ---- diff --git a/layouts/shortcodes/github_file.html b/layouts/shortcodes/github_file.html new file mode 100644 index 0000000..3ee6adc --- /dev/null +++ b/layouts/shortcodes/github_file.html @@ -0,0 +1,10 @@ +{{ $repo := .Get "repo" }} +{{ $path := .Get "path" }} +{{ $extension := index (last 1 (split $path ".")) 0 }} + +{{ $data := getJSON "https://api.github.com/repos/" $repo "/contents/" $path }} + +{{ $content := $data.content | base64Decode }} + +{{ highlight $content $extension "" }} +

View {{ $data.name }}