So a few months ago, I switched my blog from Hugo to zola, which was a nice choice at the time. Actually zola is too powerful and too simple at the same time. I switched to zola for my Academic Website, this blog and also a new Arabic blog. I was happy with zola, but I wanted to have more control over the stack and also to learn how to build a static site generator. So I decided to build my own SSG called Nida.

First, I wanted to build a simple SSG that can generate a static website from markdown files. I also wanted to have a simple and clean codebase that I can easily maintain and extend in the future. I chose Go as the programming language for Nida because it's fast, easy to learn and has a great standard library.

Nida means "call" in Arabic, and I chose this name because I want Nida to be a call for simplicity and control in the world of static site generators. Nida is still in its early stages, but I'm excited about the possibilities it offers. I don't plan for it to be replacement for zola or Hugo, but rather a simple and lightweight alternative built and used mainly by me. Actually this blog is now powered by Nida. And in the future when I get more time, I will switch both my academic website and my Arabic blog to Nida as well.

Nida philosophy is to be simple, and actually I copied the concept of having simple easy commands from zola, but I implemented them in a way that is more suitable for my needs. Nida has a simple command line interface that allows you to build, serve and deploy your website with just a few commands. Nida also has a simple configuration file that allows you to customize your website without having to write any code. Nida also has a simple templating system that allows you to create custom templates for your website without having to learn a new templating language. Unlike zola, Nida doesn't depend on third party libraries for templating, instead it uses Go's standard library for templating, which is simple and powerful enough for my needs. This both makes Nida faster and also easier to maintain and extend in the future.

There are two commands in the whole Nida binary, build and serve. The build command generates the static website from the markdown files and the templates, while the serve command starts a local development server (port 1307 by default) that allows you to preview your website. Nida also has a simple deployment system that allows you to deploy your website to GitHub Pages with just a few commands. Actually to be honest, there is a third nida version command that prints the version of Nida, but it's not really important and doesn't count, does it?

So the general format for the commands for build is:

nida build [-s PATH] [--site PATH] [-c PATH] [--config PATH] [-d] [--drafts]

And for serve is:

nida serve [-s PATH] [--site PATH] [-c PATH] [--config PATH] [-d] [--drafts] [-p PORT] [--port PORT]

Where -s or --site is the path to the site directory, -c or --config is the path to the configuration file, -d or --drafts is a flag that tells Nida to include draft posts in the generated website, and -p or --port is the port number for the development server. I always like having both short and long versions of the command line arguments, because it allows me to use the short version when I'm in a hurry and the long version when I want to be more explicit.

Most of the time, you can just run nida build or nida serve without any arguments, and it will work just fine, because Nida has sensible defaults for the site directory and the configuration file. But if you want to customize your website, you can use the command line arguments to specify the paths to your site directory and configuration file. The CLI arguments will always override the default values, so you can have multiple sites and configurations on the same machine without any conflicts (assuming that you work on couple of sites at the same time, which is not really the case for me, but you never know).

Nida also support RTL natively, which is a great feature for me as an Arabic speaker. Nida uses the dir attribute in the HTML to specify the direction of the text, and it also has a simple way to specify the direction of the text in the configuration file. This allows me to easily switch between LTR and RTL layouts without having to write any custom CSS or JavaScript.

There are two examples of Nida in the code base, one for an English website and another for an Arabic website. Of course, you can count my current blog as a third example, but I don't want to brag about it. The English website example is a simple blog that has a few posts and a simple layout, same for the Arabic website example. Both examples are fully functional and can be used as a starting point for your own blog.

Lets me compare Nida and zola a bit to give a better idea in terms of what both allow and that Nida is not trying to be a replacement for zola because it is not a general purpose static site generator. Although I intend to add some of the features that zola has in the future, but this is the current status.

AreaZolaNida
Content typesArbitrary sectionsHardcoded post/page/section only
TaxonomiesUser-defined (any name, any structure)Only tags and categories, hardcoded
Permalink patterns{year}/{month}/{day}/{slug}/{categories} etc.Only {slug} and {section}
TemplatesFull Tera engine with ~50+ functions, macros, inheritanceGo html/template with ~10 helper functions, flat define blocks
ShortcodesUser-definable, parameterizedOnly 2 hardcoded: details and rawhtml
MultilingualFull i18n: translations, language-switching, per-language contentExplicitly a non-goal; language field only sets <html lang> + text direction
Asset pipelineImage resizing, SCSS compilation, fingerprinting, lazy-loadingStatic files copied as-is; no processing
Page resourcesCo-located assets in page bundles (index.md + images in same dir)No concept of page resources
SearchBuilt-in elasticlunr index generationNone
Internal linking@/posts/hello.md with automatic path resolutionManual URLs only
Table of contentsAuto-generated from headingsNone
Config cascadeconfig.toml + environment overrides + theme configSingle config.toml, no cascade
CLIinit, build, serve, checkOnly build, serve, version
Data filesTOML/JSON/YAML data loaded into templatesNone
Build cachingRenders only changed content on rebuildRenders everything, then diffs (slower)
Theme systemLoadable themes with override chainsNo theme system (inline CSS + [extra] values)

Overall, Nida is a simple and lightweight static site generator that is designed to be easy to use and maintain. It doesn't have all the features of zola, but it has enough features for my needs, and it's much easier to maintain and extend in the future. If you're looking for a simple and lightweight static site generator that is easy to use and fit your needs if it close to mine, then Nida might be a good choice for you. If you're looking for a more powerful and feature-rich static site generator, then zola might be a better choice for you.