Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reflow and badge added
  • Loading branch information
JJ committed Jun 23, 2018
1 parent e881958 commit 5acb576
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions README.md
@@ -1,5 +1,7 @@
# Pod::To::HTML

[![Build Status](https://travis-ci.org/perl6/Pod-To-HTML.svg?branch=master)](https://travis-ci.org/perl6/Pod-To-HTML)

Render Perl 6 Pod as HTML

## SYNOPSIS
Expand All @@ -12,40 +14,40 @@ From within Perl 6:

```perl6
#Pod Block
=pod My I<super B<awesome>> embedded C<pod>
document!
=pod My I<super B<awesome>> embedded C<pod> document!

say Pod::To::HTML.render($=pod[0]);

#Pod file
say Pod::To::HTML.render('your/file.pod'.IO,
header => "your-custom-header-inside-body",
footer => "your-custom-footer-inside-body",
head-fields => "tags-inside-head",
lang => "document language (defaults to 'en')",
default-title = 'No =title was found so we use this',
css-url => 'https://example.com/css.css');
# specify css-url as empty string to disable CSS inclusion
say Pod::To::HTML.render('your/file.pod'.IO, header =>
"your-custom-header-inside-body", footer =>
"your-custom-footer-inside-body", head-fields
=> "tags-inside-head", lang => "document
language (defaults to 'en')", default-title =
'No =title was found so we use this', css-url
=> 'https://example.com/css.css'); # specify
css-url as empty string to disable CSS
inclusion

#Pod string
my $pod = q:to/END/;
=pod
My I<super B<awesome>> embedded C<pod>
document!
END
say Pod::To::HTML.render($pod,
header => "your-custom-header-inside-body",
footer => "your-custom-footer-inside-body",
head-fields => "tags-inside-head",
lang => "document language (defaults to 'en')",
default-title => 'No =title was found so we use this');
```
my $pod = q:to/END/; =pod My I<super B<awesome>> embedded C<pod>
document! END say Pod::To::HTML.render($pod, header =>
"your-custom-header-inside-body", footer =>
"your-custom-footer-inside-body", head-fields => "tags-inside-head",
lang => "document language (defaults to 'en')", default-title => 'No
=title was found so we use this'); ```
## DESCRIPTION
`Pod::To::HTML` takes a Pod tree and outputs correspondingly formatted HTML.
Generally this is done via the command line, using`perl6 --doc=HTML`, which extracts the pod from the document and feeds it to `Pod::To::HTML`.
The other route is with the `render` method (called by `--doc=HTML`), which creates a complete HTML document from the Pod tree it is called with. Optionally, a custom header/fooder/head-fields can be provided. These can be used to link to custom css stylesheets and javascript libraries.
The other route is with the `render` method (called by `--doc=HTML`),
which creates a complete HTML document from the Pod tree it is called
with.
Optionally, a custom header/fooder/head-fields can be
provided. These can be used to link to custom CSS stylesheets and
JavaScript libraries.
## DEBUGGING
Expand Down

0 comments on commit 5acb576

Please sign in to comment.