Static site generator from reStructuredText files. # Usage Run: ```shell git clone https://git.nxhs.cloud/ge/blog.git && cd blog python3 -m venv env source env/bin/activate pip install -r requirements.txt mkdir -p {layouts,content,assets/css/pygments} touch settings.toml content/my_page.rst layouts/{base,index,post}.j2 make css default ``` Put in **settings.toml**: ```toml [site] title = 'My site' index_page_title = 'Home page' datetime_format = '%d %b %Y' [build] build_dir = 'build' content_dir = 'content' templates_dir = 'layouts' assets_dir = 'assets' [pygments] theme = 'default' [docutils] ``` Create basic Jinja2 templates. **layouts/base.j2**: ```jinja2

{% if posts %} {{ site_title }} {% else %} {{ site_title }} / {{ page_title }}

{% endif %}

{% block content %}{% endblock %}
``` **layouts/index.j2**: ```jinja2 {% extends "base.j2" %} {% block content %}
{% endblock %} ``` **layouts/post.j2**: ```jinja2 {% extends "base.j2" %} {% block content %}
{{ post | safe }}
{% endblock %} ``` Put in **content/my_page.rst**: ```restructuredtext :title: My first page :date: 01 Jan 1970 ============= My first page ============= Hello, World! ``` Build site: ``` make ``` See HTML in build/ dir. Write your own CSS styles.