We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9111941 commit 7f983d3Copy full SHA for 7f983d3
util/site
@@ -20,16 +20,23 @@ my $application = route {
20
get -> '' {
21
content 'text/plain', "It's the home page"
22
}
23
+ # Simple pod to HTML conversion
24
for <language programs type> -> $section {
25
get -> $section, $path {
26
content 'text/html', pod-to-html("doc/{tc $section}/{$path}.pod6")
27
28
29
+ # Raw files
30
+ get -> 'images', $image {
31
+ content 'image/svg+xml', "html/images/{$image}".IO.slurp
32
+ }
33
34
35
# Helper routines
36
+my $template-header = "template/header.html".IO.slurp;
37
+
38
sub pod-to-html($file) {
- Pod::To::HTML.render($file.IO);
39
+ Pod::To::HTML.render($file.IO, :header($template-header));
40
41
42
my Cro::Service $hello = Cro::HTTP::Server.new:
0 commit comments