Generate pages for individual tags

This commit is contained in:
Nathan McCarty 2025-02-07 01:58:44 -05:00
parent 20ecef3b3f
commit 2072f88711
4 changed files with 35 additions and 7 deletions

View file

@ -108,6 +108,12 @@ class PostDB {
# Generate the tags pages
my @tags = %!posts.values.map(*.tags).flat.unique;
$out-dir.add('tags.html').spurt: $config.generate-tags-page(self, @tags);
my $tags-dir = $out-dir.add('tags/');
mkdir $tags-dir unless $tags-dir.e;
for @tags -> $tag {
$tags-dir.add("$tag.html").spurt:
$config.generate-tag-page(self, $tag);
}
# Render the rss/atom feed
my $atom-path = $out-dir.add('atom.xml');
my $atom = posts-to-atom self;