From 0ae6d2164dd9d8f0eadb6baac7e0bc72d9a99ce7 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Sat, 1 Aug 2020 15:16:35 -0700 Subject: [PATCH] Add preliminary support for generating some gopher type content --- _config.yml | 6 ++++++ gopher/all.gph | 16 ++++++++++++++++ gopher/index.gph | 26 ++++++++++++++++++++++++++ gopher/tags/index.gph | 16 ++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 gopher/all.gph create mode 100644 gopher/index.gph create mode 100644 gopher/tags/index.gph diff --git a/_config.yml b/_config.yml index 2487577..f184f75 100644 --- a/_config.yml +++ b/_config.yml @@ -12,6 +12,12 @@ plugins: - jekyll-include-cache - jekyll-seo-tag +gopher: + feed: false + tags: true + gophermap: _gopher/index.gph + base_path: /blog + lsi: false exclude: - README.markdown diff --git a/gopher/all.gph b/gopher/all.gph new file mode 100644 index 0000000..4f92cd0 --- /dev/null +++ b/gopher/all.gph @@ -0,0 +1,16 @@ +--- +layout: nil +--- + +Welcome to my blog! + +This content is effectively a mirror of of the content hosted at + https://brokenco.de/ + +------------------------------------------------------------------------------- + +{% for post in site.posts -%} + +[0|{{post.date | date_to_string }}: {{post.title}}|{{site['gopher']['base_path']}}{{post.path | remove_first: '_posts'}}] + +{% endfor -%} diff --git a/gopher/index.gph b/gopher/index.gph new file mode 100644 index 0000000..b2f9fe6 --- /dev/null +++ b/gopher/index.gph @@ -0,0 +1,26 @@ +--- +layout: nil +--- + +Welcome to my blog! + +This content is effectively a mirror of of the content hosted at + https://brokenco.de/ + +[1|Tags|/blog/tags] + +------------------------------------------------------------------------------- + +Latest posts: + +{% for post in site.posts limit: 10 -%} + +[0|{{post.date | date_to_string }}: {{post.title}}|{{site['gopher']['base_path']}}{{post.path | remove_first: '_posts'}}] + +{% endfor -%} + + +------------------------------------------------------------------------------- + +[1|Full archive|/blog/all] + diff --git a/gopher/tags/index.gph b/gopher/tags/index.gph new file mode 100644 index 0000000..082f4aa --- /dev/null +++ b/gopher/tags/index.gph @@ -0,0 +1,16 @@ +--- +layout: nil +--- + +This file lists all the blog posts organized by their tags + +{% assign categories = site.tags | sort %} +{% for category in categories %} +{% capture category_name %}{{ category | first }}{% endcapture %} +{{category_name}} + +{% for post in site.tags[category_name] -%} +[0|{{post.title}}|{{post.path}}] +{% endfor -%} + +{% endfor %}