use v6;
use RakuDoc::Render;
use RakuDoc::To::HTML;
%*ENV<RAKUDO_RAKUAST> = 1;

my Str $result = "---\n---\n";
my $raku-doc-path = 'tmp/test.rakudoc';
my $doc-name = $raku-doc-path;
my Str $rakudoc = $raku-doc-path.IO.slurp;
my RakuDoc::Processor $rdp = RakuDoc::To::HTML.new.rdp;
my %source-data = %(
    name     => $doc-name,
    modified => $raku-doc-path.IO.modified,
    path     => $raku-doc-path.IO.path
);
$result ~= $rdp.render( $rakudoc.AST, :%source-data);
say $result