Files
zahradka/readme.md
Jan Tojnar 11203e2e3d
Some checks failed
deploy-pages Failed to deploy
Abandon flakes in favour of npins
Flakes copy the whole gigantic repo to store all the time, quickly eating all the drive capacity.
2024-07-13 12:50:19 +02:00

29 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# mala-zahradka-pro-radost.cz
This directory contains the full source code for <https://mala-zahradka-pro-radost.cz>. The content is mostly written in [CommonMark](https://commonmark.org/) and converted into HTML with `site`, a custom [static site generator](https://en.wikipedia.org/wiki/Static_site_generator) based on [hakyll](https://jaspervdj.be/hakyll/).
The project is structured as follows:
- `content/` actual content of the site (articles, news posts, photos and other files for downloading).
- `content/novinky/` news posts.
- `static/` files used as a part of the layout (styles, scripts, images aside from content…), mostly kept as they are.
- `templates/` building blocks for generating the HTML.
- `site/` source code of the `site` program.
The revision history is tracked using [Git](https://git-scm.com/), with up-to-date version available on <https://code.ogion.cz/tojnar.cz/zahradka>. Pushing into the `main` branch of the repository will automatically update the live version of the website.
## Usage
The `site` program needs to be run in this directory. It supports the following subcommands:
- `site build` produces a `public/` directory with the website to be viewed in a web browser or uploaded to the server. If source content changes, only the pages corresponding to changed files will be updated.
- `site rebuild` cleans the `public/` directory and then runs the `build` subcommand.
- `site watch` starts a web server that will serve the built website and automatically rebuild pages corresponding to changed files. While it is running, you can browse the site on <http://localhost:8000>.
- `site check` checks for broken links in the generated website.
### UNIX
The project uses [Nix](https://nixos.org) package manager to build the `site` program. Run `nix-shell` to enter a shell containing `site` program for controlling the website.
If you have [`direnv`](https://direnv.net/) installed, you can instead run `direnv allow` and it will prepare the correct shell environment automatically every time you enter the directory.