Move MarkdownPost to its own file
This commit is contained in:
parent
3fd900b2d6
commit
f767eeb589
3 changed files with 20 additions and 13 deletions
17
lib/DB/MarkdownPost.rakumod
Normal file
17
lib/DB/MarkdownPost.rakumod
Normal file
|
@ -0,0 +1,17 @@
|
|||
use v6.e.PREVIEW;
|
||||
|
||||
use Pandoc;
|
||||
use JSON::Class:auth<zef:vrurg>;
|
||||
|
||||
use DB::Post;
|
||||
|
||||
#| A plain markdown post
|
||||
unit class MarkdownPost does Post is json;
|
||||
|
||||
#| Marker for disambiguation between post types in json representation, the
|
||||
#| cheaty way
|
||||
has Bool:D $.markdown = True;
|
||||
|
||||
method title(--> Str:D) {
|
||||
markdown-title($!source)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue