Zuzu
Zuzu is a static site generator that converts all your markdown files into static html pages. It uses Github-flavoured Markdown CSS and highlight.js to beautify code snippets.
- May 29, 2022
Zuzu is a static site generator that converts all your markdown files into static html pages. It uses Github-flavoured Markdown CSS and highlight.js to beautify code snippets.
Zuzu is a static site generator that takes in markdown files and renders HTML pages. This blog has been written using this generator. This enables noobs like me to write blogs without having to learn a lot of code :P .
⚠️ The latest version of zuzu might not updated in the original codebase, but instead all the features can be found here: anubhavpgit/anubhavpgit.github.io. A couple of features have been added to the original codebase, such as RSS feed, PDF generation, and CSS/JS injection. The better codebase is the one mentioned above❗
Zuzu builds on a very basic problem statement: I want to start my own blog without having to learn a lot of code. The current version supports a ton of features:
static
folder and Zuzu will inject them into your HTML files. Make sure to include the path in the markdown file. Example: ....<link rel="stylesheet" href="/static/css/style.css">...
.---
.Example:
--- title: 'Zuzu'
date: "29-05-2022"
description: "Zuzu is a static site generator that converts all your markdown files into static html pages.
It uses Github-flavoured Markdown CSS and highlight.js to beautify code snippets." tag: "tech"
---
rss.xml
file to the static
folder and Zuzu will take care of the rest.md-to-pdf
to convert your markdown files into PDFs. Just add the pdf
link to your markdown file and Zuzu will take care of the rest. Example: Download PDF.static
folders. The config.toml
looks like this:# Homepage
base_url = "https://anubhavp.dev/zuzu/"
# template
template = "anubhavpgit"
...
# Path to the directory containing the templates
template_dir = "templates/anubhavpgit"
# Path to the directory containing the static files
static_dir = "static"
...
# Theme
templateHTML = "templates/anubhavpgit/template.html"
Zuzu leverages Node.js and a few packages to convert markdown files into HTML pages. It parses the markdown files, extracts the front matter, and converts the markdown content into HTML. The HTML is then injected into a template to generate the final HTML page. The final HTML page is then written to the output directory. The packages used are:
The generator consists of, but not limited to, the following functions:
The script follows this flow:
To get started with Zuzu, clone the repository and install the dependencies:
git clone https://github.com/anubhavpgit/zuzu.git
cd zuzu
npm install
This would be a good place to start your markdown files. The content
folder contains all the markdown files. The templates
folder contains the HTML templates. The static
folder contains the CSS and JS files.
To generate the HTML files, run:
npm run generate
You can find two themes in the templates
folder: anubhavpgit
and initial
. To change the theme, change the template
in the config.toml
file, and the templateHTML
in the config.toml
file. Zuzu is highly configurable. You can add your own CSS and JS files to the static
folder and include them in the markdown file, or better, start with your own theme
.
The zuzu repository is a good place to start. The latest version of zuzu might not updated in the original codebase, but instead you can always find all the features maintained here: anubhavpgit/anubhavpgit.github.io.
I am eagerly looking for someone to migrate all the features to the original codebase. Feel free to ping me if you’re interested.
If you really dig zuzu, I would suggest you try Zuzu out, and then maybe contribute to the codebase. The codebase is open-source and contributions are welcome. Feel free to add comments, issues, or pull requests. Update the codebase, add new features, or even create your own theme. The world is your oyster, and zuzu is your playground.