website/lib/DB/IdrisPost.rakumod

25 lines
528 B
Raku
Raw Normal View History

2025-01-22 20:53:52 -05:00
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(:pretty);
2025-01-22 20:53:52 -05:00
#| Marker for disambiguation between post types in json representation, the
#| cheaty way
has Bool:D $.idris = True;
method title(--> Str:D) {
markdown-title($!source)
}
2025-02-03 20:41:31 -05:00
# Use katla to highlight our file, mangle the resulting output, and then pass it
# through to pandoc for html generation
method render-html(--> Str:D) {
die "Not implemented";
}