home
NOTE: Under Construction - I'm in the middle of upgrading my site and lots of stuff is kinda broken. Please forgive the mess.

Neopolitan - Section And Attribute Tokens

One of the goals with the format is to make it extensible. The way I'm handling that is by making the section types arbitrary and putting the responsibility on the rendering engine to apply the proper template based off the names and attributes.

January 2024

Section Name Rules --

The rules for defining a section type are:

Code
-- alfa

---- bravo

-- c.h.a.r.l.i.e

-- ๐’นโ‚‘โ‚—โ‚œโ‚

-- /echo

Section Attribute Types

Section attributes come in two types:

  • boolean

  • key/value

Boolean Section Attributes

The rules for boolean attributes are the same as the section rules with the exception that instead of starting after the start of the file or an empty line, each one must start on a line immediatly following a line that starts a section or a line with another attribute.

Key/Value Section Attributes

Key value attributes work like boolean with the additional properties:

  • The key must end with a : character

  • The : must be followed by exactly one space character

  • The value is any text up until the end of the line

An example of a code section with a rust boolean attribute and id key/value pair.

Code
-- code
-- rust
-- id: sample_code
โ•โ•โ• ยง โ•โ•โ•