💾 Archived View for tilde.team › ~benk › d0706a1d.gmi captured on 2021-11-30 at 20:18:30. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Spacing in Gemdocs

Authors: Ben K. <benk@tilde.team>

Date: 2021-05-04

I feel like I'm kind of obsessive about how to format my Gemini documents internally. Every browser is going to render them slightly differently, so it would be tough to target all the browsers out there except for maybe one or two. I mainly browse in Diohsc, so that's usually the first thing I look at my pages with. However, lately I've been checking them with Lagrange as well, since that seems to be the de facto standard for GUI browsing in Gemini.

Now, there's a few stylistic preferences I've always had since I started doing this. I don't know if I saw them somewhere (like in Markdown) and learned them subconsciously, but it started out being intuitive. Today after consciously reviewing these habits, I found that they were worthwhile to remember as conscious rules:

The main principle is, that whitespace is good. My documents seem to suffer if they don't have enough of it. There's probably also such a thing as too much, so these are the rules I am trying to stick by:

1. Put a blank line between all logical elements. We know about this for paragraphs, but a single, even space is also good to have before and after header lines and link lines. As to whether one should put a space between list items within a list, I don't know. I tend not to, but it couldn't hurt, could it? Here's what I think is bad style:

# Header 1
=> link
## Header 2
This is my first paragraph.

After this paragraph, a link:
=> link

I prefer:

# Header 1

=> link

## Header 2

This is my first paragraph.

After this paragraph, a link:

=> link

It's really tempting to pack things after a header, but I found that usually it doesn't work out. Even so, I still do this:

# Title
Author
Date

I guess this is OK. They sort of form a nice little grouping together, though perhaps a blank line after the title would be aesthetically pleasing?

2. A space belongs after header markers and other symbols. I do not like:

#Title



=>link

I don't even know to what extent these are valid, but I guess they are acceptable per the spec. However, they are hideous compared to:

# Title



=> link

I guess there is no rule #3. Pretty simple. :)

What's your style? Do you try to write gemdocs a certain way, or do you just wing it?