diff --git a/lib/Config.rakumod b/lib/Config.rakumod index fc1f057..73c4831 100644 --- a/lib/Config.rakumod +++ b/lib/Config.rakumod @@ -10,14 +10,20 @@ method generate-post(Str:D $title, Str:D $content, BlogMeta:D $meta) { head [ meta :charset; meta :name, :content; - # meta :name, :content; - title ""; + title "{$meta.title} — $title"; + # TODO: Add style sheets + # TODO: Add description + # TODO: Add header links ]; - my $body; + my $body = + body [ + div :class, [ + $content + ] + ]; + # TODO: Setup footer # my $footer; - die "Not done yet"; - my $html = html :lang, [ $head, $body diff --git a/lib/DB/MarkdownPost.rakumod b/lib/DB/MarkdownPost.rakumod index e395949..f901ce3 100644 --- a/lib/DB/MarkdownPost.rakumod +++ b/lib/DB/MarkdownPost.rakumod @@ -2,7 +2,6 @@ use v6.e.PREVIEW; use Pandoc; use JSON::Class:auth; - use DB::Post; #| A plain markdown post @@ -13,10 +12,10 @@ unit class MarkdownPost does Post is json(:pretty); has Bool:D $.markdown = True; method title(--> Str:D) { - markdown-title($!source) + markdown-title $!source } # Simply provide our source file to pandoc method render-html(--> Str:D) { - die "Not implemented"; + markdown-to-html $!source }