Markata uses python's powerful jinja2 templating library for its templates as well as giving authors the ability to inject variables right into their markdown posts. This post contains quite a few examples of using jinja variables, compare it's output in the browser to the raw markdown file in pages/jinja.md
.
__version__
The veresion of markata used to build the site. (0.5.3)
date
A python datetime object. (2023-01-15)
Frontmatter
All variables from your post frontmatter like title
(Jinja Variables) and tags
(['home', 'meta']). If you are not familiar with frontmatter it's the content at the top
of a markdown file between ---
. Markata uses the most common type of
frontmatter, yaml
.
---
# this is the frontmatter
date: 2022-09-29 13:26:33
title: Home Page
---
## the post
markdown gets written after the frontmatter
markata
The last variable exposed is an instance of markata.Markata
called markata
.
This allows you to reference all of your other posts in very interesting ways.
such as getting the latest post -> Creating Your Feeds
You can also map over posts to get more.