umi was a very basic static site generator.
It was used by this site from it's creation (in 2020) until July 2024, when I started writing all the HTML.
It wasn't perfect, but it did the job well enough.
umi made use of HTML files and HTML templates to create sites.
Those HTML templates were a bit limited (there was no conditional syntax or text-replacement), but there were plans to expand on them.
To run umi, you only need a Python installation.
Download & Install
I'd recommend cloning the entire umi git repository as this includes the documentation.
There are, however, alternative ways.
git
Either install git and run git clone https://codeberg.org/supercell/umi, or directly download the git repository and extract the archive (.zip, .tar.gz).
These "installation" steps only apply for POSIX systems, including OS X.
Find a directory in your PATH that you have permission to write and execute from, and then create a symbolic link.
# find a directory you can write/execute to/from. printf "%s\n" "$PATH" # if you can't find a directory, try this: mkdir $HOME/.local && mkdir $HOME/.local/bin printf "export PATH="$PATH:$HOME/.local/bin\n" >> $HOME/.profile # I'll use the directory we created above as an example, just replace # the path with your own one. chmod u+x ~/path/to/umi-directory/umi.py ln -s ~/path/to/umi-directory/umi.py ~/.local/bin/umi
Directly Downloading umi.py
If you don't want the documentation/example site, then you can just download the umi.py file itself, then follow the steps above for finding a directory you can write to and execute from.
History
umi was originally created to just be a simple static site generator that didn't use any third-party libraries or programs.
For as long as umi was developed, this held true!
It changed a little since the beginning, and there is still a lot to tidy up and smooth out, but I'd hoped that the code was somewhat easy to modify due to a self-imposed restriction of only one file for umi.
One of the main purposes of being a "simple static site generator" was that people could edit the file to fit their needs with little hassle.
Something that was straight forward in how it worked so it could be fully read and understood in a short amount of time.
In February 2024, umi was improved to only re-write the files that had been updated since last run.
This reduced the time required to build sites, for example, this site took less than 60ms to build when content was changed.
It's wasn't perfect, since it didn't register template updates, but that was planned.
Planned Future
These points were written when umi was being actively developed.
They will not be completed by me.
- Making use of HTML attributes when using templates
- The attributes would act like variables, which the template could use somewhere, and the page that includes the template supplies the name="value".
- Code Readability
-
The never ending goal.
As stated in the History section, umi was designed to be simple to hack on.
So improvements to comments, variable naming, and a general cleanup. - Rebuild files if template updated
- While umi will only rebuild files in your "content" directory if they've been updated since last build, it doesn't rebuild files if the templates they use have been modified.
- Neocities Intergration
-
While this was a very personal need, it would've been helpful to be able to upload files via the CLI.
I wanted to implement the above "Rebuild if template updated" before working on this.