- C 84.5%
- Zig 9.8%
- CSS 2.7%
- HTML 1.6%
- Makefile 0.7%
- Other 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| blog | ||
| zettp | ||
| zettp-kani | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| docker-readme.md | ||
| Dockerfile | ||
| favicon.ico | ||
| favicon.png | ||
| Makefile | ||
| README.md | ||
Zettp
Zettp is a zig written, extensible and easibly hackable http server and templating system that eliminates all javascript bloat from webservers.
Zig version: 0.17.0
This repository will be the new primary home for all zettp components and acts as a monorepo for all the components. Component specific repositories are deprecated
This repo also acts as a template for new zettp project.
Modules
| Module | Role |
|---|---|
| Zettp | Http server |
| Zettp-kani | Static site generator |
Requirements
| Tech | Version |
|---|---|
| Zig | 0.17.0 |
| gcc +glibc(or musl) | gnu23 (gcc >= 14.2) |
How to use
make # (or 'make force' to force recretion of .html files)
make run
# Or (clean build generate run)
make cr
# Cr but force regeneration of .html files
make cr-force
Md files
I have configured the template to use the md files from the blog/ folder.
To add mode files, drop your md files there and add the files into zettp-kani/config.h
Configuring
Static site generation
All static site generation configuration can be found from zettp-kani/config.h
Zttp
All zttp configurations can be found from zettp/src/html,
refer to the zettp repo for more information.
Making changes, adding files etc
After adding or changing .md files, or making changes to any configuration files (.h, .c or .zig), you need to rebuild and rerun the server. Easy way to rebuild everything and generate new .html files without overriding allready presents ones:
make cr
make cr = make clean build ssg run.
if you need to force regenration of old .html files, do
make cr-force
Note
Changes to .html or .css files does not require rebuilds or restarts, those update in realtime.
Docker/Podman
More information on how to run the server with docker/podman, see docker-readme