bUwUma - Build System for Websites
Build Websites using Make
bUwUma
is a build system that uses GNU make and a preprocessor to build static, multilingual websites.
bUwUma
includes the following features:
- Embed markdown files in your HTML
- Variables
- Conditional control structures (if, else)
- SASS support
- Generation of a XML sitemap
- Generation if all required favicons from a single file
- Generation of thumbnails for videos, audio files and pdfs
- Generation of web-optimized versions of images
- Generation of a (side-)navigation menu from HTML headings and custom links
- Simple creation of a website in multiple languages
Approach
bUwUma
aims to allow the creation of a classic website (html+css+javascript) following the DRY and KISS principles.
That means: Reduce repetitions and keep it simple, in order to make the project more maintainable.
The approach to building a website using bUwUma
is similar to building a C-project:
You have a source and a build directory.
The source (code), which are all the html, css, javascript files as well as all the resources like images and fonts, live in the source directory.
make
then... makes the website and places it in the build directory.
You can then deploy the website by copying the build directory onto your webserver.
Build process
During the build process, the following happens:
- HTML files are processed by the preprocessor.
It will substitute all variables and include additional files into the document (for example a head, footer or text written in markdown).
Additionally, a navigation menu can be generated in included in the file.
The resulting HTML document will be placed into the build directory.
- A sitemap in the XML format is created in the build directory. It will contain all files in which the preprocessor found a
sitemap include
command.
- SASS files are compiled by sass compiler and the resulting CSS files are placed into the build directory.
- Favicons are generated from a single image. This includes the
favicon.ico
, as well as favicon.png
, apple-touch-icon.png
, android-chrome.png
and mstile.png
variants an appropriate sizes.
- Thumbnails are generated for the desired files in the desired format and placed in the build directory.
- Web-optimized versions are generated for the desired images in the desired format and placed in the build directory.
- All other source files (css, javascript, resources like fonts and images) are copied into the build directory.
Undesired features can be disabled in the Makefile.
$ cd ~/Website/src
$ make
Making directory ../www/de/
Making directory ../www/en/
Building html de/kontakt.html at ../www/de/kontakt.html
Building html in lang de: common/index.html at ../www/de/index.html
Building html in lang en: common/index.html at ../www/en/index.html
Making directory ../www/style/
Building: style/style.css at ../www/style/style.css
$ ls ../www
de en style
$ ls ../www/de
index.html kontakt.html
$ make clean
Getting Started
To build a website using bUwUma
, you will only have to install the dependencies, edit a few well documented variables in the Makefile and learn a handful of preprocessor commands.
The commands should be pretty intuitive to use.
bUwUma
is made primarily for Unix, but it only requires a suitable command line environment.
That makes it also usable in Windows Subsystem for Linux or in directly Windows, if the required dependencies are installed.
Dependencies
⚠formula incomplete