commit: 55e265d26aeb003458b17b8c8a0c7c629699d1d4
parent e926b878781da1bcf9551ea9ab7a5289036f9468
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 27 Sep 2020 10:22:49 -0400
List gemini-exclusive posts on the WWW page
Diffstat:
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/content/gemini.md b/content/gemini.md
@@ -0,0 +1,15 @@
+---
+title: What is Gemini?
+---
+
+The [Gemini](https://gemini.circumlunar.space/) protocol is an alternative to
+HTTP, and Gemtext is an alternative document format to HTML. This blog is
+available over both Gemini and HTTP, and some content is exclusive to each.
+To connect with Gemini, you will need a Gemini client. I wrote one called
+[gmnlm][gmni], and there are more [listed here][others].
+
+[gmni]: https://git.sr.ht/~sircmpwn/gmni
+[others]: https://gemini.circumlunar.space/clients.html
+
+Once you have your client working, direct it to `gemini://drewdevault.com` and
+you'll be your way.
diff --git a/layouts/index.html b/layouts/index.html
@@ -5,13 +5,17 @@
<h1>{{$.Title}}</h1>
{{ range (where .Site.RegularPages "Section" "blog") }}
- {{- if .OutputFormats.Get "html" }}
<div class="article">
<span class="date">{{.Date.Format "January 2, 2006"}}</span>
+ {{- if .OutputFormats.Get "html" }}
<a href="{{.Permalink}}">{{.Title}}</a>
+ {{- else if .OutputFormats.Get "gemtext" }}
+ {{ with .OutputFormats.Get "gemtext" }}
+ <a href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">{{end}}{{.Title}}</a>
+ <small>[<a href="/gemini.html">what is gemini://?</a>]</small>
+ {{ end }}
</div>
{{ end }}
- {{ end }}
</section>
<aside>