💾 Archived View for anachronauts.club › cgi-bin › repos › cgi › guide.git › tree › trunk › text-gemi… captured on 2021-12-05 at 23:47:19. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
1 text-gemini(5) "The Anachronaut's Guide" "The Anachronaut's Guide" 2 3 # NAME 4 5 *text-gemini* - the text/gemini format 6 7 8 # DESCRIPTION 9 10 The text/gemini format is a simple hypertext markup format, designed for use 11 with the Gemini protocol. It is similar to a stripped-down version of Markdown, 12 and looks similar to plain text. You can write it using any text editor. 13 14 15 # FORMAT 16 17 text/gemini is a line-oriented format; the type of each line is indicated by 18 the first few characters. There is no inline formatting, e.g. bold and italic. 19 20 21 ## TEXT LINES 22 23 Any line which doesn't match one of the line types listed below is a text line. 24 Text lines get rendered as-is, usually in a proportional font, wrapped to the 25 width of the user's browser window. 26 27 Note that unlike Markdown, there is no concept of paragraphs; line breaks in 28 the text/gemini markup are preserved. It is therefore recommended that 29 paragraphs be placed entirely on one line. 30 31 Blank lines are also preserved, and can be used to provide spacing between 32 paragraphs, before and after headers, etc. 33 34 35 ## LINK LINES 36 37 Lines beginning with => are link lines, and have the following format: 38 39 ``` 40 =>[<whitespace>]<URL>[<whitespace><USER-FRIENDLY LINK NAME>] 41 ``` 42 43 where 44 45 - <whitespace> is any non-zero number of consecutive spaces or tabs. 46 - Square brackets indicate that the enclosed content is optional. 47 - <URL> is a URL, which may be absolute or relative. 48 49 For example, the following are valid link lines: 50 51 ``` 52 => gemini://example.org/ 53 => gemini://example.org/ An example link 54 => gemini://example.org/foo Another example link at the same host 55 => foo/bar/baz.txt A relative link 56 => gopher://example.org:70/1 A gopher link 57 ``` 58 59 Spaces in URLs should be written as %20. Other special characters should also 60 be percent-encoded. You can link to non-Gemini resources as well; simply 61 specify the appropriate scheme. 62 63 64 ## PREFORMATTING TOGGLE LINES 65 66 Lines beginning with ``` (three back-ticks) begin or end preformatted text. 67 Preformatted text has spaces preserved, is not wrapped, and is displayed in a 68 monospaced font. This is useful for displaying ASCII art, code samples, etc. 69 70 The opening ``` may be followed by some text which denotes "alt text" for the 71 following preformatted block. This can be used to provide a textual summary of 72 ASCII art for screen readers. 73 74 75 ## HEADING LINES 76 77 Lines beginning with # are interpreted as headings. There are three levels of 78 headings, denoted by one, two, or three leading # characters. For example: 79 80 ``` 81 # Heading 1 82 ## Heading 2 83 ### Heading 3 84 ``` 85 86 You may wish to leave blank lines above and below heading lines. 87 88 89 ## UNORDERED LISTS 90 91 Lines beginning with an asterisk and a space are unorder list lines. Some 92 clients may replace the asterisk with a fancy bullet. For example: 93 94 ``` 95 * Bread 96 * Milk 97 * Eggs 98 ``` 99 100 101 ## QUOTE LINES 102 103 Lines beginning with > are quotes. Many clients render such lines specially, 104 e.g. by offsetting them from the main text, italicising them, or just 105 rewrapping them with a > in front of each line. For example: 106 107 ``` 108 > I'm coming back in... and it's the saddest moment of my life. 109 > --Edward White 110 ``` 111 112 113 # EDITORS 114 115 For your convenience, we have syntax highlighting for Gemini preinstalled for 116 several editors. 117 118 119 ## NANO 120 121 If you are using *nano*(1) as your editor, you can add the following line into 122 your _~/.config/nano/nanorc_ if you don't already have it: 123 124 ``` 125 include "/usr/local/share/nano/site/gemini.nanorc" 126 ``` 127 128 This will enable syntax highlighting for .gmi files. 129 130 131 ## VIM 132 133 If you are using *vim*(1) as your editor, our site configuration already 134 provides syntax highlighting for .gmi files. 135 136 137 # NOTES 138 139 This document includes text written by solderpunk <solderpunk@posteo.net>, 140 taken from _gemini://gemini.circumlunar.space/docs/_