This repository contains the Zig Common Tasks
website, which is built with Magnanimous.
All Zig samples are in the source/processed/samples/ directory.
The Zig files are just plain zig files, but include Magnanimous metadata so that they can be included in the main HTML file generated from source/processed/index.md.
To run the samples' tests:
zig build test
To build the website:
magnanimous -style monokai
Get Magnanimous by downloading a binary from its Releases Page or with go install github.com/renatoathaydes/magnanimous@0.11.1
if you have Go installed.
Contributions are welcome!
Guidelines:
- samples should not be too trivial, but also not complex.
- must only use Zig's standard library.
- should be cross-platform (runs at least on Mac, Windows and Linux).
- preferrably, use tests...
main
also ok if side effects are unavoidable (like printing something).
All samples are unlicensed and belong to the public domain!
Procedure:
- make sure you're using the Zig version declared in test.yml (if it's old, feel free to update it!).
- add your sample file in
source/processed/samples/
. Start by copying one of the existing ones. - ensure the metadata (
name
,id
) is correct. - run
zig fmt source/processed/samples/
. - run
zig build test
. - Make a merge request on OpenCode or GitHub.
This project's source code is currently hosted on:
The website is published by the above hosts on:
- https://renatoathaydes.github.io/zig-common-tasks/
- http://renatoathaydes.mypages.tech/zig-common-tasks/
Feel free to add to other hosts.