Permalink
Browse files

add possibility to inject things into the HTML header

  • Loading branch information...
1 parent b5fca92 commit a372b5d085ed74e1435c8ab23c732352f283d438 @moritz moritz committed Aug 1, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Pod/To/HTML.pm
View
@@ -61,7 +61,7 @@ sub assemble-list-items(:@content, :$node, *% ) {
#= Converts a Pod tree to a HTML document.
-sub pod2html($pod, :&url = -> $url { $url }, :$header = '', :$footer = '') is export returns Str {
+sub pod2html($pod, :&url = -> $url { $url }, :$head = '', :$header = '', :$footer = '') is export returns Str {
($title, @meta, @indexes, @body, @footnotes) = ();
&OUTER::url = &url;
@body.push: node2html($pod.map: {visit $_, :assemble(&assemble-list-items)});
@@ -90,6 +90,7 @@ sub pod2html($pod, :&url = -> $url { $url }, :$header = '', :$footer = '') is ex
' </style>',
' <link rel="stylesheet" href="http://perlcabal.org/syn/perl.css">',
( do-metadata() // () ),
+ $head,
'</head>',
'<body class="pod" id="___top">',
$header,

0 comments on commit a372b5d

Please sign in to comment.