theendoftheworld
Sign in
You are reading revision #4 of 14. The current version may differ.

Style Guide

Revision #4 by

electra
,

Conventions for writing pages here, and a live reference for the layout syntax. Everything below is rendered by the same pipeline your pages use, so what you see is what you get.

Titles and structure

Use sentence case for headings. A page's URL comes from its title, so "How to Survive" becomes /wiki/how-to-survive. Slugs are fixed at creation — renaming a page changes its heading, not its address, so existing links keep working.

Start every page with a one-paragraph summary before the first heading. Readers who leave after two sentences should still know what the page is about.

Element When to use it
## Major sections
### Subsections
Blockquote Asides and warnings
Table Comparisons, not layout

Linking

Prefer wiki links over full URLs for internal pages. They survive changes to the display text, and they turn red when the target does not exist yet — the link just above is red, because nothing has been written there.

Use a path to point somewhere specific: [[Style Guide]] finds this page, [[game/bosses/margit]] addresses one exactly. A bare name prefers a sibling of the current page.

Layout

Blocks can be positioned with directives. All of them are written as :::name, optionally with {attributes}, and closed with ::: on its own line. The Alignment and Object buttons in the editor insert these around whatever you have selected.

Aligning a block

This paragraph is centered in the column.

And this one is aligned right.

:::center
This paragraph is centered in the column.
:::

:::left, :::center and :::right take no attributes. Nothing sits beside an aligned block — it occupies its own row.

Putting something beside text

A struct sets its first block to one side and lets the text run alongside it. When the text passes the bottom of that block, it reflows across the full width.

A struct's first block. Usually an image. It floats to the side you choose.

Text placed after it starts level with the top of this block and wraps alongside. Once the text runs past the bottom edge, it reclaims the full width of the struct — which is what you are reading right now, assuming this paragraph is long enough to have traveled past the block on the left. Structs close themselves, so whatever follows begins cleanly underneath.

:::struct{side=left width=third}
![A picture](/api/media/your-image-id)

Text that sits beside the image and wraps beneath it.
:::

side is left or right. width is quarter, third or half, and applies to the floated block rather than the struct. Anything unrecognized falls back to left and third.

Structs can be nested. Write every fence as ::: — the renderer widens the outer ones for you, so you never have to count colons.

Floating a block on its own

:::float does the same thing without grouping, so the wrap continues through everything that follows until you stop it.

:::float{side=right width=quarter}
![A picture](/api/media/your-image-id)
:::

Text here wraps around the float, and so does every following paragraph.

::clear

Use ::clear to resume full width. A struct never needs it; a float usually does.

Prefer a struct when the pairing is one image and its description. Reach for a float when several paragraphs should wrap past a single image.

On small screens

Floated blocks become full width on phones, with text above and below rather than beside. A third of a phone screen is roughly thirty characters per line, which is not readable — so the side-by-side arrangement is deliberately dropped rather than squeezed.

Images and audio

Upload files with the Files button, give each one a short description, then paste the markdown snippet the manager offers you.

  • Descriptions appear when someone hovers the image, and are used as its alt text
  • Marking an image featured puts it in the panel beside the page body
  • Every file appears in the gallery at the foot of the page, audio included
  • Nothing plays on its own

Past eight files, a search box appears above the strip. It matches loosely, so drk finds dark-forest.png, and it searches the original filename as well as the description you gave it.

Text formatting

Standard GitHub-flavored markdown: bold, italic, strikethrough, inline code, and fenced blocks.

  • Task lists work
  • Including unchecked items

Blockquotes are for asides and warnings.

Two additions to the standard set:

You write You get
x^2^ x2
H~2~O H2O

Markers have to touch their content: ^2^ works, ^ 2 ^ does not. A lone ^ or ~ is left alone, so 2^10 and ~/notes are safe. Strikethrough still needs both tildes.

Raw HTML is removed before a page is stored, so anything not covered by the syntax above will not survive.

The editor

Tools are grouped by what they do. Every button is a glyph — hover one for its name.

Group Tools
Edit Undo, Redo
Text Italic, Bold, Superscript, Subscript
Object Heading, Struct, Right Struct, Table
Alignment Center, Right, Float Light, Float Left, Stop Wrap
View Line Numbers, Syntax Highlighting

Text tools wrap the selection. With nothing selected they insert both markers and leave the cursor between them, so you can type straight into the emphasis.

Undo and Redo

Both light up only when there is something to do. A run of typing undoes as one step; each toolbar action is its own. Ctrl+Z, Ctrl+Shift+Z and Ctrl+Y all work. The history lasts for the session — reloading clears it.

Headings

Heading opens H1 through H6. Picking a level replaces whatever the line already had rather than stacking onto it, applies to every non-blank line the selection touches, and works on an empty line.

You can also click any heading on a page you are allowed to edit. That opens the editor at that line.

Tables

Table opens a grid. Hover to size it and click to insert; on a touch screen, tap the cell you want. The row count includes the header, so 3 x 2 means three columns, a header, and one row to fill in.

View Toggles

Line numbers start off, Syntax colors start on. Both are remembered per browser rather than per page. Turning colors off leaves the line numbers alone.

Size and Place

Drag the lower-right corner to resize the editor. Preview stays the same size, and both go back to the default when you reload.

Switching between Write and Preview keeps your place — the preview opens at the passage you were editing, and sends you back to it when you return.

Saving

Save writes the page and leaves you in the editor. Save and Quit writes it and returns you to the page. Save changes color while you have unsaved work, and goes quiet once it lands.

Before you save

  • There is a summary paragraph at the top
  • Headings run in order, with no levels skipped
  • You wrote an edit summary

Back to /getting-started/The End of the World.