Aerographite
Tiny lightweight static site generator written in Python that uses markdown and liquid to generate a website.
How it works
The way it works is simple by design. The aerographite script checks for a site directory, which is your website's source directory. A template site_template is provided as a submodule, which can be copied and modified for your site. The (site_directory)/templates directory contains liquid templates for generating the html skeleton of your website. Markdown is used for the webpage contents. The index.md is the markdown file that generates the front page of the website.
You can put markdown files in the site directory and have them generated as (site_directory)/(page name). You can also put html in the markdown files and it will render in the body.To customize the html outside the body use templates. For javascript you can source your scripts either in the markdown files or html template. You can also have blog-style posts by putting markdown files in the site/(posts_directory)/ directory. posts_directory is by default posts.
The name for the posts needs to be formatted as: (posts_directory)/YYYY-MM-DD-title.md.
The posts need to have a metadata header:
title: Post Title
date: YYYY-MM-DD HH:mm
Posts will be indexed in /posts which you can link in index.md or anywhere else.
The (site_directory)/files/ directory is for any miscellaneous files that get copied to the output directory out/.
The generated website is outputted to the output directory ready to be deployed to a web server or wherever.
Configuration
You can configure many things, such as blog post generation, the name of the index page, rss feed generation, and the posts directory.
To configure these things, copy the config_template.yaml to your site directory.
If you change the posts_directory you must also rename it in your site directory, since that is the directory it will look for at generation time. This will change the url where your posts are, for example if you want it to be /blog such as example.com/blog change the posts_directory to blog.
RSS Feed Generation
You can generate an RSS feed (posts_directory)/rss.xml by setting rss_feed_generation in the config.yaml to True. You need to set a site_url, language, and feed_description. If you do not set an index_page_title it uses the site_url as the RSS feed title.
Installation
If you want to install aerographite from the pip repositories, run:
$ pip3 install aerographite
If youw want to install aerographite from this repo, follow these instructions:
First you need to install the requirements:
$ pip3 install -r requirements.txt
Next, install aerographite using pip:
$ python3 -m pip install .
How to use
Provide your own site directory or use the template and modify it to your needs:
$ git submodule update --init
$ cp site-template (site_location)
Next, edit the site how you see fit.
Finally, to generate a website run:
$ aerographite (site_directory) (output_directory)
To view your website locally, run a web server:
$ python3 -m http.server -d (output_directory)
Screenshots
Here are some screenshots of the example site to demonstrate what aerographite can do.
Metadata
Release files for aerographite 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aerographite-1.0.2.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aerographite-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / aerographite-1.0.2.tar.gz
| Download URL | aerographite-1.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d18b97fe62e191ffbcc70ca066c876b5edf863f0443e24b064336f5497a4fc0
|
|
BLAKE2b-256 checksum How to use checksums |
0bc32d0a6e1c3ff7b8506ea280cb06c1d20bbe460381e45fc5755c2d7190ca23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / aerographite-1.0.2-py3-none-any.whl
| Download URL | aerographite-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5563d1ddb8c5aa45ebe36729195f6a094b0477fc7ba15b79708df9db0aa028a
|
|
BLAKE2b-256 checksum How to use checksums |
b67072142f7d2e77446c2cacea9d089f9296e477ceeff7e7abb5198dae88e24e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|