Metadata support

This commit is contained in:
Nathan McCarty 2025-01-21 22:08:10 -05:00
parent 1d01a8986f
commit 707b55d761
2 changed files with 22 additions and 3 deletions

9
blog
View file

@ -33,7 +33,14 @@ multi MAIN(
die "Database file already exists, use --force to overwrite: {$file.Str}"
if $file.e && !$force;
my $db = DB::PostDB.new;
print "Blog Title: ";
my $title = get;
print "Tagline: ";
my $tagline = get;
my $meta = DB::BlogMeta.new: title => $title, tagline => $tagline;
my $db = DB::PostDB.new: meta => $meta;
if $force {
$file.spurt: $db.to-json, :create-only;