use v6.e.PREVIEW;
use HTML::Functional;
use DB::BlogMeta;
unit class Config;
# TODO: Support GFM admonitions
method generate-post(Str:D $title, Str:D $content, BlogMeta:D $meta) {
my $head = head [
meta :charset;
meta :name, :content;
title "{$meta.title} — $title";
# TODO: Add style sheets
# Use Iosevka Alie as the monospace font
link :rel,
:href;
# Use open sans as the content font
link :rel :href;
link :rel :href :crossorigin;
link :rel,
:href;
style %?RESOURCES.slurp;
style %?RESOURCES.slurp;
# TODO: Add description
# TODO: Add header links
];
my $body =
body [
div :class, [
$content
]
];
# TODO: Setup footer
# my $footer;
my $html = html :lang, [
$head,
$body
];
"$html"
}