Sample Page

Example content

This is a sample page intended to demonstrate which org-elements are supported by Firn as well as to show different render functions being called. Everything before the heading "Render function examples" is automatically built by Firn, and can be styled by the user. Most colours, fonts, and spacing can be change in the CSS variables in firn_base.css


Headings

TODO Heading with a keyword

Currently, TODO and DONE and rendered specifically in headlines. This will be improved to include user-input keywords in a future release.

Headings with a logbook

The Logbook is not rendered, but is collected when processed made available as data in your layouts. See the bottom of this document

DONE A Heading with a priority.

Headings Level Three, with Properties

baz: 20
foo: bar

A heading with properties can optionally render those properties, either by enabling this feature in the config.edn file, or in the in-buffer-setting.

A An H4 heading with priority A
B An H5 Heading with Priority B
C An H6 Heading with Priority C

Tables

Tables are converted into HTML tables:

NameArea
Arctic14,056,000 km2
Atlantic106,460,000 km2
Indian70,560,000 km2
Pacific165,250,000 km2
Southern20, 330,000 km2

Tagsexample

Headlines with :tags: will automatically create a tag on the right of the heading that links to a /tags page. The tags.clj page can be found in _firn/pages/tags.clj and can be edited.


Org Dates

Org dates are rendered as plain text, but are provided with a css class ( .firn-timestamp ) for optional styling: 2020/6/25 .


Render function examples

The following examples demonstrate the ability of the 'render' function; each code sample demonstrates usage, as well as the output below it.

Rendering a specific heading

(render "Find and render me!")

Find and render me!

If you can see this, then the render function found this heading and rendered it and its content.


Rendering a table of contents

(render :toc)
  1. Example content
    1. Headings
      1. Heading with a keyword
      2. Headings with a logbook
      3. Heading with a priority.
        1. Headings Level Three, with Properties
          1. An H4 heading with priority A
            1. An H5 Heading with Priority B
              1. An H6 Heading with Priority C
    2. Tables
    3. Tags
    4. Org Dates
  2. Find and render me!

Rendering a table of contents, staring at a specific headline.

(render :toc {:headline "Headings"})
  1. Headings
    1. Heading with a keyword
    2. Headings with a logbook
    3. Heading with a priority.
      1. Headings Level Three, with Properties
        1. An H4 heading with priority A
          1. An H5 Heading with Priority B
            1. An H6 Heading with Priority C

Rendering a table of contents, up to a specific depth.

(render :toc {:depth 1})
  1. Example content
  2. Find and render me!

Rendering a table of contents, up to a specific depth, starting at a specific heading, but excluding the heading started at.

(render :toc {:headline "Headings" :depth 1 :exclude-headline? true})

Rendering the sum Logbook of this file, as a polyline svg. This is a rather opinionated 'render'; it sorts your logbooks into years and the renders a graph for each year.

(render :logbook-polyline {:height 70 :stroke "salmon"})
2020
2019