Previous shot at picking a static site generator for https://arnes.space
  • SCSS 91%
  • CSS 8.2%
  • Nix 0.8%
Find a file
2021-07-30 09:14:35 +02:00
assets Remove unused font files 2021-07-30 09:14:35 +02:00
content/posts Update README about netrepl and make sure we can stop the watch command 2021-07-29 21:48:42 +02:00
.envrc Let there be light 2021-07-07 16:06:47 +02:00
.gitignore Let there be light 2021-07-07 16:06:47 +02:00
flake.lock Let there be light 2021-07-07 16:06:47 +02:00
flake.nix Embed IBM plex and use sass 2021-07-30 00:20:51 +02:00
index.janet Fix font loading (with flash of unstyled content) 2021-07-30 01:52:10 +02:00
lockfile.jdn Install via jpm deps 2021-07-07 21:08:27 +02:00
project.janet Embed IBM plex and use sass 2021-07-30 00:20:51 +02:00
README.md Update README about netrepl and make sure we can stop the watch command 2021-07-29 21:48:42 +02:00
utils.janet Flesh out page structure 2021-07-29 21:53:42 +02:00
views.janet Embed IBM plex and use sass 2021-07-30 00:20:51 +02:00

arnes.space

The files in this repository contain the basis for https://arnes.space. The development environment is defined using the nix package manager. After you have installed it and enabled nix flakes you can install all dependencies required to build the static page using the following commands:

nix develop
jpm load-lockfile

Architecture

The site itself is built using bagatto, which is a static site generator using the janet programming language. The main entry point is index.janet and you can rebuild the website using the bagatto binary:

bag index.janet

The build output is in site, you can upload that to wherever static files are served from.

Starting a netrepl from within bagatto

When running bagatto with the --repl flag, you can start a netrepl which Conjure can connect to:

(def env (curenv))
(def t (thread/new (fn [_] (netrepl/server "127.0.0.1" 9365 env))))

All the bagatto functions like eval-data and eval-site are available in the netrepl session as well. A static site generator from your repl! 🔥

Continuously rebuild the site on changes

Easy as π! Use entr, which is included in the development environment:

while sleep 0.5s; fd | entr -d sh -c 'bag index.janet'; end