Files
Jan Tojnar 98ce54f310
All checks were successful
deploy-pages Deployed in 13 seconds
Switch to npins & abandon haskell.nix
Flakes copy the whole gigantic repo to store all the time, quickly eating all the drive capacity.
haskell.nix is PITA to use on lower-spec devices.
2024-07-14 18:46:35 +02:00

2.1 KiB
Raw Permalink Blame History

strom-roku-2023.krk-litvinov.cz

This directory contains the full source code for https://strom-roku-2023.krk-litvinov.cz. The content is mostly written in CommonMark and converted into HTML with site, a custom static site generator based on 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, with up-to-date version available on https://code.ogion.cz/tojnar.cz/strom-roku-2023.krk-litvinov.cz. 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 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 installed, you can instead run direnv allow and it will prepare the correct shell environment automatically every time you enter the directory.