Permalink
Browse files

Added HTML wrapper to generated HTML index.

  • Loading branch information...
1 parent d7a191c commit 2505499f9aa50a14d0c0c7039687a01b004a4acf @chromatic committed Mar 21, 2012
Showing with 17 additions and 1 deletion.
  1. +17 −1 lib/Pod/PseudoPod/DOM/Index.pm
@@ -38,7 +38,23 @@ sub emit_index
{
my $self = shift;
my $entries = $self->entries;
- return join "\n", map { $entries->{$_}->emit } sort keys %$entries;
+ my $heading = <<END_HTML_HEAD;
+<html>
+<head>
+<link rel="stylesheet" href="../css/style.css" type="text/css" />
+</head>
+<body>
+<h1 id="index"><a name="index"></a>Index</h1>
+END_HTML_HEAD
+
+ my $footer = <<END_HTML_FOOTER;
+</body>
+</html>
+END_HTML_FOOTER
+
+ return $heading
+ . join( "\n", map { $entries->{$_}->emit } sort keys %$entries )
+ . $footer;
}
__PACKAGE__->meta->make_immutable;

0 comments on commit 2505499

Please sign in to comment.