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.
- posts and standalone pages
- Go template themes using
.htmlfiles with override chains - loadable themes with template inheritance
- tags and categories
- RSS, Atom, sitemap, robots.txt, and search index generation
- static asset copying
- content diagnostics for broken internal links and missing Markdown images
- local development server with watch mode and livereload
- optional custom
404.html - RTL document support for languages such as Arabic/Persian
On Linux or macOS, install the latest prebuilt release:
curl -fsSL https://melashri.net/nida/install.sh | sh
nida versionBy default this installs to $HOME/.local/bin. Set NIDA_INSTALL_SYSTEM=1 for
a system-wide install, NIDA_INSTALL_DIR for a custom directory, or
NIDA_VERSION to install a specific release tag.
brew tap MohamedElashri/nida
brew install nidaDownload 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=vX.Y.Z
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 versionmacOS 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 versionOther 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 versiongo install github.com/MohamedElashri/nida/cmd/nida@latestOr build from source:
git clone https://github.com/MohamedElashri/nida.git
cd nida
go build ./cmd/nida
./nida versionBuild a site:
nida build --site ./example-siteServe it locally:
nida serve --site ./example-siteThe default local address is:
http://127.0.0.1:2906
Commands:
nida init [PATH]
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 versionCreate an example site:
nida init ./my-site
nida serve --site ./my-sitenida init creates a buildable example site in a new or empty directory. The
example includes sample posts, tags, feeds, a search page, search settings, a
page bundle, and templates you can edit. It refuses to write into a non-empty
directory.
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.
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 = "/" }]Markdown raw HTML is disabled by default. Enable it only for trusted-author sites that intentionally need raw HTML in Markdown:
[markdown]
unsafe_html = trueTemplate 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.
The repository includes two example sites:
- example-site: English example blog
- example-site-ar: Arabic RTL example blog
MIT. See LICENSE.
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.