Skip to content

Commit d7aec39

Browse files
committed
Document methods in Website class
1 parent 8e2abeb commit d7aec39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Pod/Htmlify.pm6

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Website is export {
1111
has $.base-categories-dir is rw = "categories";
1212
has %.examples-metadata;
1313

14+
#| build the website
1415
method build {
1516
self.write-index;
1617
self.collect-all-metadata;
@@ -19,6 +20,7 @@ class Website is export {
1920
self.write-example-files;
2021
}
2122

23+
#| create category and subcategory directories
2224
method create-category-dirs {
2325
for $!categories.categories-list -> $category {
2426
my $category-dir-name = $!base-html-dir ~ "/categories/" ~ $category.key;
@@ -30,12 +32,14 @@ class Website is export {
3032
}
3133
}
3234

35+
#| write main index file
3336
method write-index {
3437
say "Creating main index file";
3538
spurt $!base-html-dir ~ '/index.html',
3639
self.p2h(EVAL slurp('lib/HomePage.pod') ~ "\n\$=pod");
3740
}
3841

42+
#| write index files for all categories
3943
method write-category-indices {
4044
say "Creating category index files";
4145
my @headers = qw{File Title Author};
@@ -50,6 +54,7 @@ class Website is export {
5054
}
5155
}
5256

57+
#| write html pages for all examples
5358
method write-example-files {
5459
for $!categories.categories-list -> $category {
5560
my $category-key = $category.key;
@@ -108,6 +113,7 @@ class Website is export {
108113
return $example;
109114
}
110115

116+
#| convert the POD into html
111117
method p2h($pod) {
112118
my $head = slurp 'template/head.html';
113119
my $footer = footer-html;

0 commit comments

Comments
 (0)