Pykari looks for static files in the _static subdirectory and copies all files with the extension .css, .js, .jpg, and .png to _build/_static. Edit the configuration file to use static files with other extensions.
Pykari looks for HTML templates in the _templates directory. Pykari will automatically use the default.html template to render HTML pages unless a different template is specified in the metadata of the Markdown source file. For example, to use _templates/great_design.html as a template, include the following in the metadata:
---
title: Webpage with a Different Design
date: 2025-07-31
template: great_design
---
When Pykari creates an HTML file, it extracts metadata from the frontmatter of the Markdown source file and replaces variables in the template with the corresponding values from the metadata. Pykari uses Jinja to render the templates; follow Jinja conventions to format your templates.
In addition to metadata fields, Pykari also automatically assigns values to two additional variables that can be used in HTML templates:
BODYPykari converts the body of each Markdown file to HTML and assigns the body text to the variable BODY. Use {{ BODY }} in your Jinja template to indicate where the content of each Markdown file should appear in the HTML generated by Pykari.
ROOTPykari constructs a relative path from the Markdown file to the source directory and assigns it to the variable ROOT. Use {{ ROOT }} for links to project pages in your templates. For example, to include a link to dir/file.html on all project pages, write the following in your template:
<a href="{{ ROOT }}/dir/file.html">File</a>
When Pykari renders a file, such as path/to/other/file.html, it will replace ROOT with the relative path to the source directory (which will correspond to the relative path to the build directory in the generated HTML):
<a href="../../../dir/file.html">File</a>
The <h1> tag is the highest section level on a page. It is recommended that you reserve this tag for the page title and that you use the <h1> tag and the {{ title }} expression in your HTML templates. For example:
<body>
<h1 id="title">{{ title }}</h1>
{{ BODY }}
</body>
Refer to the Pykari Markdown guide for additional information about titles and headings.
Refer to the guide to Pykari templates for details about how to create a custom template.