Usage
This section describes the directory structure of blgit and its basic usage. It covers how the files and folders are organized and provides guidance on how to use the tool effectively for managing your blog.
blgit uses the following file structure:
template
ββ html.j2
ββ index.j2
ββ post.j2
index.md
post
ββ my_first_post.md
docs
ββ index.html
ββ index.css
ββ my_first_post.html
The .j2
files in the template
folder control the appearance of your homepage and each post.
In the post
folder, you write all your content in .md
files. blgit is flexible with file structure, allowing you to use either a flat or hierarchical organization.
The index.md
file serves two purposes: primarily, it contains the content of your homepage; additionally, it configures certain aspects of the blog generation process.
The docs
folder is where the generated blog is saved.
Feel free to customize the .j2
files to suit your needs. You can also add images and other files to the docs
folder, as well as edit the index.css
fileβblgit will not overwrite or delete your files.
The docs
folder should be uploaded to your static hosting service (e.g., GitHub Pages).
To create this directory structure and generate your blog, simply run:
blgit build
Tip: If you don't want to run blgit
after every change, you can use your favorite file-watching tool like this:
ls **.css **.j2 **.md | entr -c blgit build