From edf22aa93e0d4929110c2ba09851e93098a4854e Mon Sep 17 00:00:00 2001 From: wgroeneveld Date: Sun, 4 Apr 2021 14:26:19 +0200 Subject: [PATCH] I changed my mind. Do not remove markdown-specific emphasis in .gmi files. --- content/post/2021/04/using-hugo-to-launch-a-gemini-capsule.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/post/2021/04/using-hugo-to-launch-a-gemini-capsule.md b/content/post/2021/04/using-hugo-to-launch-a-gemini-capsule.md index a88232ca..5be516f6 100644 --- a/content/post/2021/04/using-hugo-to-launch-a-gemini-capsule.md +++ b/content/post/2021/04/using-hugo-to-launch-a-gemini-capsule.md @@ -37,7 +37,7 @@ The plan fell through. Instead, I decided to mirror Brain Baking. Why? ## How to publish on Gemini? -Right. Porting articles turns out to be ridiculously easy with the help of my good old friend, Hugo. [Sylvain's method](https://sylvaindurand.org/gemini-and-hugo/) for declaring Gemini as a custom Hugo output format turned out to work flawlessly. All credits go to him. However, I did make a few significant changes to the link replacement system. +Right. Porting articles turns out to be ridiculously easy with the help of my good old friend, Hugo. [Sylvain's method](https://sylvaindurand.org/gemini-and-hugo/) for declaring Gemini as a custom Hugo output format turned out to work flawlessly. All credits go to him. However, I did make a few significant changes to the link replacement system. First, something important to consider: I _do not_ get rid of special emphasis symbols such as underscores or stars, that are Markdown-specific. I still think they add something when reading plain text and they're the next best thing to have without any markup at all. So I removed those regex-es. Gemini pages cannot have inline links, so I had to strip out Markdown-style `[]()` links and place them on a separate paragraph using `=> link title`. A simple find-and-replace, like in Sylvain's method, is quite ugly if you use inline links extensively like I do. It breaks up the text and the result is a difficult to read Gemlog (that's a Gemini blog!). In my approach, I collect all links, replace them with a reference number like in academic papers (`[1]`), and add a section called "References" on the bottom of the article to list them all. This is what it looks like: