-
Notifications
You must be signed in to change notification settings - Fork 6
Writing Guide
Wrap text between square brackets [example]
, then indent the next line to create a new page. Anything you write in that indented block will then be part of this new page. All text inside pages is parsed as markdown.
When a page is created, its ID / hash #
is inferred from the text inside the square brackets. As you can see from the address bar above, hashes are used to dictate which page is currently being displayed - this is achieved purely via CSS with the target
selector.
The first page you create in the file is considered the home page of your site and will be displayed when no hash is specified. Anything before that is not rendered into the website - use that space for comments, attributions, or global $options
(more on this later).
You can keep creating square-bracketed text in your page and indent again to create nested pages. When a page is created inside a page, a link to the new page is automatically added to the page at the position where the new indented nested block starts:
Duplicated hashes / pages are automatically taken care of for you. If you create two pages [page]
and [page]
, the second one will be assigned a hash of #page2
, but still be rendered as page
.
If you want to use specify a label for the auto-generated link, include the label text between round brackets immediately before closing the square brackets: [newpage(Fancy new page)]
will create a page with the hash #newpage
, but the link to it will display Fancy new page
.
If you prefer to not create a link automatically, wrap the text with double square brackets [[example]]
. The page will still be created and inserted in the document structure, but it will be up to you to link your visitors to it. You can do so by creating a markdown link to the page hash: [Link to the page](#hiddenpage)
. If your page ID has spaces in it, wrap the markdown link in < >
: [Link to the page](<#hidden page>)
Note that when creating a hidden page, its location in the site still follows the indentation rules and will be reflected in the breadcrumbs at the top of the page.
Any line that starts with //
is a comment and won't be parsed. Any page that that starts with .
(i.e. [.page]
) won't be parsed, nor inserted in the document structure. Good for drafts.
Any line that starts with $
is considered an option
and is not displayed in the document structure, but it will be parsed and used under the bonnet to change the generated site appearance / behaviour.
Options are written in the $[option] : [value]
format, or can precede indented blocks for options with multi-line values, like the $style
option:
\$style:
body {
background: red;
}
When an $option
is added before the home page / at indentation zero, its effect will be applied to the whole website. Otherwise, it's applied to the parent page. Note that some options are only valid in a context or the other.
For a full list of options and their effects, check the options page.