basic idris rendering

This commit is contained in:
Nathan McCarty 2025-02-04 01:20:57 -05:00
parent 56833369ce
commit 2c38910ccd
3 changed files with 44 additions and 9 deletions

View file

@ -84,7 +84,10 @@ class PostDB {
my $id-path = $by-id.add: "$id.html";
$id-path.spurt: $html;
for $post.all-slugs -> $slug {
$by-slug.add($slug).symlink: $id-path;
# remove the symlink if it already exists
my $slug-path = $by-slug.add: $slug;
$slug-path.unlink if $slug-path.l;
$id-path.symlink: $slug-path;
}
}
# Render the archive