Ochrs Syntax

Markdown Extensions

Ochrs has a few additions on top of normal Python Markdown. These are the extensions being used by the parser:

fenced_code, BacklinkExtension, CodeHiliteExtension, md_in_html, toc, tables, pymdownx.superfences, markdown_checklist.extension, CiteExtension

Most of these are officially supported, some are from pymdownx, some are from the third party extension list, and some are custom extensions included as part of Ochrs.

Citations

CiteExtention is a custom extension that turns -- Name Here into <cite>Name here</cite>.

BacklinkExtension is an enhanced version of WikiLinkExtension that supports aliased links and can include anchor links.

Build-Time Functions

There are also build-time functions that you have access to on all pages. The list of extensions above is one of these, generated at built-time by Ochrs. The format to insert one of these functions is:

Some normal text <ochrs:func-name:arg1:arg2> some more text

Currently available Ochrs functions:

ochrs-funcs, example, page-count, build-time, md-extensions, recent-edit, sitemap, tags, random-js

This are parsed prior to Markdown generation, so will take precedence over any Markdown syntax.

Tags

Ochrs detects array of tags in the YAML frontmatter of a Markdown file. They should be in the following format.

---
tags:
  - relics
  - unix
---

These can be displayed in the using the ochrs:tags function.

These will be collated on the tags page. If any tags written in the Markdown source match the name of any individual page, that page (and its children) will all be assigned to that tag. See Unix for this in action.