Makompile is a website compiler. It compiles very simple markdown-like .txt
files
into a static website with navigation, autogenerated index, wiki-like links and a few
other neat features. This markdown variant is designed to be very easy to use, read
(both compiled and in plaintext) and to remember. I made it because I wanted to use it.
Actually Makompile as a whole is very easy to use. You can use Makompile to create your own websites too!
Makompile documents are written in plain .txt
files. Easy to read, easy to edit.
To create a Makompile project, you need the following directory structure:
/source
(you will store your .txt
files here)
/include
(optional, see below)
styles.css
(you will use this file to style your website)
makompile.py
(the Makompile compiler)
Inside /docs
you are supposed to create as many .txt
files as you want. Make
sure their contents are formatted used the Makompile format (more on this below).
The name of the .txt
file MUST be in lowercase.
If you have a file called home.txt
, this will also act as the homepage
of your website. Since websites require a homepage, if you host it on a server without
having written your home.txt
your website might not work properly.
If you have a folder called /include
, the contents of that folder will be copied into the
/docs
folder every time you rebuild your site.
For technical reasons, you cannot have a file named index.txt
in your /docs
directory.
You've been warned!
Try to keep the names of your txt files in only A-z
letters, numbers, and the characters
_
, -
, ~
and .
, otherwise some errors may arise.
To compile your Makompile project just run python3 makompile.py
from the
root of your project. A /docs
directory will be created with all your site inside
of it.
Lines that start with #
are titles. They look very big.
Lines that start with ##
are subtitles. They look big.
Lines that start with ###
are sub-subtitles. They look somewhat big.
Links to pages within your website are written [Like This]
, assuming a file named
like this.txt
exists in your /docs
directory. [LIKE THIS]
and [LiKe ThIs]
point to the same page because the intralinks are case-insensitive. They look Like This.
They can also link to pages outside your website. For example [https://github.com]
will link to
https://github.com. But that doesn't look nice, does it?
If you want to change the displayed text of a link, you can do it like this: [Visit GitHub | https://github.com]
or [visit the page that was called "Like This" | Like This]
. Now our GitHub link looks
much better!
Lists in Makompile are created using *
or %
as bullets. *
is used for unordered
lists and %
is used for ordered lists.
There must not be any empty lines between list elements, otherwise multiple lists will be created. Lists cannot mix different bullet types. Sublists can be created by adding two (2) spaces before the bullet. Sub-sublists by adding four (2). Sub-sub-sublists by adding six(6), and so on and so on. For example:
* This is an unordered list element. * This is another element. * Oops! This element has a subelement! * Another one?? * What is happening? A new sublist! * That one was short. * Never mind. % This is a different list! % Indeed it is! % With a sublist in it!
That list will be rendered like this:
To embed images in your Makompile document, use: [[ img path_to_image ]]
For example: [[ img images/makompile_logo.png ]]
Pictures also support other paramenters:
alt
for alt text. For example: [[ img images/makompile_logo.png | alt The logo of Makompile ]]
link
to create link images. For example: [[ img google_logo.png | link https://google.com ]]
class
to set a CSS class for this image element. For example: [[ img picture.png | class my_picture ]]
These parameters can also be combined in any order:
[[img mako.png | alt Mako from Eterspire! | link https://eterspire.com | class character]]
Makompile also supports italic text (__italic text__
), bold text (**bold text**
)
and small text (_*small text*_
). Inline code can be created with backticks, like this:
`This is code`
While multiline code can be written by writing a line with three backticks, then in the next lines the code, and then closing it with another line that's just three backticks. Like this:
# ``` # This text will be formatted as code. # The backticks must be the only thing in the line. I'm adding # before # each line here so that the ``` inside this code section will not close # the code section. # ```
That's it!
Makompile is a single Python file. Visit the GitHub Repository to check it. Pull requests are welcome, as are bug reports, issues or whatever.
Makompile was created by Lartu over the course of four hours on July 24, 2025 (from 1 am to 5 am).