You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/Raku/Pod-To-HTML/actions/workflows/test.yaml)
**Note**: Perl 6 2018.06 introduces changes on how non-breaking whitespace was handled; this is now included in the tests. If the installation fails, please upgrade to Perl 6 >= 2018.06 or simply disregard the test and install with `--force` if that particular feature is of no use to you.
42
-
43
-
**Note 2**: Perl6 2018.11 introduced handling of Definition blocks, `Defn`. Please upgrade if you are using that feature in the documentation.
44
-
45
42
Description
46
43
-----------
47
44
48
45
`Pod::To::HTML` takes a Pod tree and outputs correspondingly formatted HTML using a default or provided Mustache template. There are two ways of accomplishing this:
49
46
50
-
* from the command line, using `raku --doc=HTML`, which extracts the Pod from the document and feeds it to `Pod::To::HTML`.
47
+
* from the command line, using `raku --doc=HTML`, which extracts the Pod from the document and feeds it to `Pod::To::HTML`.
51
48
52
-
* from within a Raku program via the exported `render` subroutine, which creates a complete HTML document from the Pod. This allows more customization (`title`, `subtitle`, and `lang` can override Pod's corresponding semantics, different Mustache template (possibly with partials), additional template variables for the template, etc.) than simply rendering the Pod via `raku --doc=HTML` which just use the default template.
49
+
* from within a Raku program via the exported `render` subroutine, which creates a complete HTML document from the Pod. This allows more customization (`title`, `subtitle`, and `lang` can override Pod's corresponding semantics, different Mustache template (possibly with partials), additional template variables for the template, etc.) than simply rendering the Pod via `raku --doc=HTML` which just use the default template.
53
50
54
51
Exported subroutines
55
52
--------------------
@@ -79,20 +76,22 @@ Template information
79
76
80
77
*`footnotes`: The Pod document's [footnotes](https://docs.raku.org/language/pod#Notes).
81
78
82
-
Additional information can be made available to the Mustache template by supplying to `render` as named arguments. For example, `css-url => https://design.raku.org/perl.css` will be available to the template as `css-url`.
79
+
Additional information can be made available to the Mustache template by supplying to `render` as named arguments.
83
80
84
81
### Semantic Blocks
85
82
86
83
Semantic blocks are treated as metadata and supplied as such to a Mustache template. For example, from the Pod document:
87
84
88
-
=begin pod
89
-
=TITLE Classes and objects
90
-
=SUBTITLE A tutorial about creating and using classes in Raku
91
-
=LANG English
92
-
=DATE January 01, 2020
93
-
=end pod
85
+
```raku
86
+
=beginpod
87
+
=TITLEClasses and objects
88
+
=SUBTITLEA tutorial about creating and using classes in Raku
89
+
=LANGEnglish
90
+
=DATEJanuary 01, 2020
91
+
=endpod
92
+
```
94
93
95
-
the template variables `title`, `subtitle`, `lang`, and `date` are made available to a Mustache template. Both `title` and `subtitle` can be overridden via the `render` subroutine.
94
+
The template variables `title`, `subtitle`, `lang`, and `date` are made available to a Mustache template. Both `title` and `subtitle` can be overridden via the `render` subroutine.
96
95
97
96
**Note**: Pod's semantic blocks can be overridden via `render` by using a variable of the same name.
98
97
@@ -104,13 +103,49 @@ Check the [examples](resources/examples/README.md) directory (which should have
104
103
Debugging
105
104
---------
106
105
107
-
You can set the `P6DOC_DEBUG` environmental variable to make the module produce some debugging information.
106
+
You can set the `RAKUDOC_DEBUG` environmental variable to make the module produce some debugging information.
You can use and distribute this module under the terms of the The Artistic License 2.0. See the LICENSE file included in this distribution for complete details.
129
+
* Jonathan Stowe
130
+
131
+
* Richard Hainsworth
132
+
133
+
* Antonio Gamiz
134
+
135
+
* Oleksander Kiryuhin
136
+
137
+
* Elizabeth Mattijsen
138
+
139
+
And many other Raku Community members.
140
+
141
+
Source can be located at: https://github.com/raku-community-modules/Pod-To-HTML . Comments and Pull Requests are welcome.
142
+
143
+
COPYRIGHT AND LICENSE
144
+
=====================
145
+
146
+
Copyright 2011-2025 Raku Community
147
+
148
+
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
115
149
116
150
The `META6.json` file of this distribution may be distributed and modified without restrictions or attribution.
0 commit comments