website/lib/DB/IdrisPost.rakumod

18 lines
336 B
Raku

use v6.e.PREVIEW;
use Pandoc;
use JSON::Class:auth<zef:vrurg>;
use DB::Post;
#| A literate, markdown, idris post
unit class IdrisPost does Post is json;
#| Marker for disambiguation between post types in json representation, the
#| cheaty way
has Bool:D $.idris = True;
method title(--> Str:D) {
markdown-title($!source)
}