-- Leo's gemini proxy

-- Connecting to senders.io:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en;

re: Spacing in Gemdocs


This is my reply to:

benk's Spacing in Gemdocs


I have generally a lot of opinions when it comes to spacing, especially in markdown, which at my job is what all of our documentation is written in. Since gemtext is somewhat similar I carried over a lot of my spacing habits from that.


Spaces everywhere


This isn't tabs vs spaces but - I like things to be well spaced. So that agrees with Ben's post of:


# Header (has a space between the # and title)

The text for a section has a line between the header and the paragraph.

* List has a space between the * and the item

Everything should be well spaced. But sometimes those rules can be broken. For example within this document the link back to the original gemlog is not separated by a space from the line:

> This is my reply to:


# re: Spacing in Gemdocs

This is my reply to:
=> gemini://tilde.team/~benk/202105050237.gmi benk's Spacing in Gemdocs

I have generally a lot of opinions when it comes to spacing...

The reason for this is I omit the empty line between parts that are logically connected. Essentially what would normally be "inline" in markdown has no line spacing between. Similarly the quote above the second example is not separated by an extra line.


Why?


In amfora, my primary reader - a lot of the document is rendered effectively, as-is. But even in more rich GUIs these spacings get represented.


I generally save the file and open it up in a few readers before adding it to my index, or publishing it in my feed. If it doesn't look the way I intended I'll make edits until it looks correct, this may even mean breaking my "rules".


This post jumped out to me because I've saved other peoples gemlogs, especially early on to check out how other people were styling. And I am quite the style hound when it comes to markdown pull-requests at work. Because Markdown, especially for Github, has such a loose syntax and various ways to do the same thing, I like to enforce some consistency. Not using tabbing in to represent a codeblock, but specifically using the triple ```. Things like that.


File naming


File naming is something else that I take quite seriously. My file is always named <date>-<header> with any special characters stripped out. However, where this gets tricky is - what happens when I want to make two posts for the same day? Do I add the hours to them? Since a lot of readers take date prefixed file names as "the post date" My posts trend towards the bottom of lists, and sometimes lexigraphical sorting makes posts that came after appear before. I generally don't mind unless time IS important (my cert migration post) where I let the modification time be the actual time for the post and used gluon's script to preserve the dates when I needed to make an edit.


gluon's Edit files preserving the Unix timestamps


Note: There were some follow-ups in the IRC about a bug that I don't know if it was fixed in the post itself but are in my local copy of it:

[https] git.senders.io/senders/gemini/tree/atom/tstool.sh


Conclusion


I can be nitpicky when it comes to syntax and spacing. What we need is an auto-formatter like go/rust so no debate can be had :) Should be a fun, simple project since there is very syntax in a gemtext file.


Links


Gemlog

Home

-- Response ended

-- Page fetched on Sat Apr 20 01:18:19 2024