Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updates test to check for template filling
And also updates a bit the README.md to reflect the use of templates. Refs #35 but shouldn't be closed unless it's documented actually on the code.
  • Loading branch information
JJ committed Dec 8, 2018
1 parent 0513a85 commit 3eb562b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -16,6 +16,10 @@ This module is in the [Perl 6 ecosystem](https://modules.perl6.org), so you inst
simply disregard the test and install with `--force` if that
particular feature is of no use to you.

**Note**: Perl6 2018.11 introduced handling of Definition blocks,
`Defn`. Please upgrade if you are using that feature in the
documentation.

## SYNOPSIS

From the command line:
Expand Down Expand Up @@ -55,6 +59,11 @@ say Pod::To::HTML.render($pod,
lang => "document language (defaults to 'en')",
default-title => 'No =title was found so we use this');

# If you want to use a specific template
say pod2html $=pod[0], :templates("lib/templates");
# main.mustache should be in that directory


```

## DESCRIPTION
Expand Down
7 changes: 5 additions & 2 deletions t/120-templates.t
@@ -1,10 +1,12 @@
use Test;
use Test; # -*- mode: perl6 -*-
use Test::Output;
use Pod::To::HTML;
plan 3;
plan 4;
my $r;

=begin pod
=TITLE The usual suspects
The seven suspects are:
=item Happy
Expand Down Expand Up @@ -32,3 +34,4 @@ ok $r ~~ ms[[

$r = pod2html $=pod[0], :templates("t/templates");
ok $r ~~ ms[[ '<meta description="This is a new template"/>' ]], 'Gets text from new template';
ok $r ~~ ms[[ "<h1 class='title'>The usual suspects</h1>" ]], 'Fills template correctly';

0 comments on commit 3eb562b

Please sign in to comment.