Metadata support
This commit is contained in:
parent
1d01a8986f
commit
707b55d761
2 changed files with 22 additions and 3 deletions
9
blog
9
blog
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue