Add series links
This commit is contained in:
parent
d170a2fccf
commit
4793d660e2
6 changed files with 54 additions and 10 deletions
|
@ -11,14 +11,15 @@ use DB::Post;
|
|||
unit class Config;
|
||||
|
||||
# TODO: Support GFM admonitions
|
||||
method generate-post(Post:D $post, BlogMeta:D $meta) {
|
||||
method generate-post(Int:D $id, Post:D $post, $db) {
|
||||
my $meta = $db.meta;
|
||||
my $content = $post.render-html;
|
||||
my $head = generate-head($meta, $post.title, $post.description);
|
||||
my $body =
|
||||
body [
|
||||
site-header $meta;
|
||||
article :class<post>, [
|
||||
post-header $post;
|
||||
post-header $id, $post, $db;
|
||||
div :class<post-body>, [
|
||||
$content;
|
||||
]
|
||||
|
@ -46,7 +47,7 @@ method generate-blurb(Int:D $id, $db) {
|
|||
h2 $post.title;
|
||||
];
|
||||
];
|
||||
post-info $post;
|
||||
post-info $id, $post, $db;
|
||||
if $desc ~~ Str:D {
|
||||
div :class<post-blurb-description>, [
|
||||
p $post.description;
|
||||
|
@ -117,7 +118,7 @@ method generate-tag-blurb($db, $tag, $limit?) {
|
|||
a :href($link), span [
|
||||
h3 $post.title;
|
||||
];
|
||||
post-info $post;
|
||||
post-info $id, $post, $db;
|
||||
if $desc ~~ Str:D {
|
||||
div :class<tag-blurb-post-description>, [
|
||||
p $post.description;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue