nida

module
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: MIT

README

Nida

Nida is a small Go static site generator for blogs and personal sites. It reads Markdown with TOML front matter, renders pages with Go HTML templates, and writes a static site you can serve anywhere.

Features

  • posts and standalone pages
  • Go template themes using .html files with override chains
  • loadable themes with template inheritance
  • tags and categories
  • RSS and sitemap generation
  • static asset copying
  • local development server with watch mode and livereload
  • optional custom 404.html
  • RTL document support for languages such as Arabic/Persian

Install

Homebrew
brew tap MohamedElashri/nida
brew install nida
Prebuilt Binary

Download a release archive from GitHub Releases.

For shell installs, resolve the latest release tag first:

TAG=$(curl -fsSL https://api.github.com/repos/MohamedElashri/nida/releases/latest | sed -n 's/.*"tag_name": "\(v[^"]*\)".*/\1/p')
VERSION=${TAG#v}

or choose a specific release tag:

TAG=v0.5.1
VERSION=${TAG#v}

Then download and install the appropriate archive for your platform. For example,

Linux x86_64:

curl -L -o nida.tar.gz "https://github.com/MohamedElashri/nida/releases/download/${TAG}/nida_${VERSION}_linux_x86_64.tar.gz"
tar -xzf nida.tar.gz
chmod +x nida
sudo mv nida /usr/local/bin/nida
nida version

macOS Apple Silicon:

curl -L -o nida.tar.gz "https://github.com/MohamedElashri/nida/releases/download/${TAG}/nida_${VERSION}_darwin_arm64.tar.gz"
tar -xzf nida.tar.gz
chmod +x nida
sudo mv nida /usr/local/bin/nida
nida version

Other archives are published for Linux arm64, macOS Intel, and Windows x86_64.

Windows PowerShell:

$TAG = (Invoke-RestMethod "https://api.github.com/repos/MohamedElashri/nida/releases/latest").tag_name
$VERSION = $TAG.TrimStart("v")
Invoke-WebRequest -Uri "https://github.com/MohamedElashri/nida/releases/download/${TAG}/nida_${VERSION}_windows_x86_64.zip" -OutFile "nida.zip"
Expand-Archive -Path "nida.zip" -DestinationPath ".\nida"
.\nida\nida.exe version
Go
go install github.com/MohamedElashri/nida/cmd/nida@latest

Or build from source:

git clone https://github.com/MohamedElashri/nida.git
cd nida
go build ./cmd/nida
./nida version

Usage

Build a site:

nida build --site ./example-site

Serve it locally:

nida serve --site ./example-site

The default local address is:

http://127.0.0.1:1307

Commands:

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

Site Layout

site/
├── config.toml
├── content/
│   ├── posts/
│   └── pages/
├── templates/
├── static/
├── themes/
│   └── ink/
│       ├── config.toml
│       ├── templates/
│       ├── static/
│       └── scss/
└── public/

Themes are optional. Without a theme setting, the site uses templates and assets from templates/ and static/ directly.

Theme System

Set theme = "name" in config.toml to use a theme from themes/name/. Themes support inheritance via extends = "parent" in their config.toml.

Theme template files override site templates with the same name. Theme SCSS and static assets are compiled/copied before site assets, allowing site customization while keeping theme defaults.

# site config.toml
theme = "ink"

[extra]
footer = { text = "Custom footer text" }
# themes/ink/config.toml
name = "Ink"
description = "A minimalist theme"
extends = "base"

[extra]
main_menu = [{ name = "Home", url = "/" }]

Config Security Notes

Markdown raw HTML is disabled by default. Enable it only for trusted-author sites that intentionally need raw HTML in Markdown:

[markdown]
unsafe_html = true

Template helpers named safeHTML/safeCSS are compatibility aliases for trusted template output. Prefer the clearer unsafeHTML/unsafeCSS names in new themes, and do not apply them to untrusted values.

Examples

The repository includes two example sites:

Useful starting points:

Documentation

License

MIT. See LICENSE.

Name Meaning

Nida (نداء) is Arabic for "call" or "summons". It reflects the idea of a blog as a call to share thoughts and ideas with the world. The name also has a nice ring to it and is easy to remember.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL