I changed my mind. Do not remove markdown-specific emphasis in .gmi files.

This commit is contained in:
Wouter Groeneveld 2021-04-04 14:26:19 +02:00
parent e64d8ffd0c
commit edf22aa93e
1 changed files with 1 additions and 1 deletions

View File

@ -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: