Basci atom feed generation
This commit is contained in:
parent
7d5cbfba3c
commit
53c0c6a9d6
6 changed files with 101 additions and 7 deletions
|
@ -5,12 +5,14 @@ unit module DB;
|
|||
|
||||
use Pandoc;
|
||||
use JSON::Class:auth<zef:vrurg>;
|
||||
use XML;
|
||||
|
||||
use DB::Post;
|
||||
use DB::BlogMeta;
|
||||
use DB::MarkdownPost;
|
||||
use DB::IdrisPost;
|
||||
use DB::PlaceholderPost;
|
||||
use Atom;
|
||||
use Config;
|
||||
|
||||
subset PostTypes where MarkdownPost:D | IdrisPost:D | PlaceholderPost:D;
|
||||
|
@ -92,12 +94,14 @@ class PostDB {
|
|||
$out-dir.add('index.html').spurt: $config.generate-index(self);
|
||||
# Render the archive
|
||||
$out-dir.add('archive.html').spurt: $config.generate-archive(self);
|
||||
# TODO: Symlink the about article
|
||||
# Symlink the about article
|
||||
my $about-path = $out-dir.add('about.html');
|
||||
$about-path.unlink if $about-path.l;
|
||||
$by-id.add("{$!meta.about-id}.html").symlink: $about-path;
|
||||
# TODO: Render the rss/atom feed
|
||||
die "Not Implemented"
|
||||
# Render the rss/atom feed
|
||||
my $atom-path = $out-dir.add('atom.xml');
|
||||
my $atom = posts-to-atom self;
|
||||
$atom-path.spurt: ~$atom;
|
||||
}
|
||||
|
||||
#| Get a list of posts sorted by date
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue