22
22
my % types ;
23
23
my % routines ;
24
24
my % methods-by-type ;
25
+ my $ footer ;
25
26
26
27
sub pod-gist (Pod ::Block $ pod , $ level = 0 ) {
27
28
my $ leading = ' ' x $ level ;
@@ -79,6 +80,9 @@ ($out_dir = 'html', Bool :$debug)
79
80
}
80
81
say " ... done" ;
81
82
83
+ $ footer = footer-html;
84
+
85
+
82
86
for (@ source ) {
83
87
my $ podname = . key ;
84
88
my $ file = . value ;
@@ -88,7 +92,7 @@ ($out_dir = 'html', Bool :$debug)
88
92
% types {$ what }{$ podname } = " /$ what /$ podname" ;
89
93
my $ pod = eval slurp ($ file . path ) ~ " \n \$=pod" ;
90
94
if $ what eq ' language' {
91
- spurt " $ out_dir /$ what /$ podname .html" , pod2html($ pod , : url(& url-munge ));
95
+ spurt " $ out_dir /$ what /$ podname .html" , pod2html($ pod , : url(& url-munge ), : $ footer );
92
96
next ;
93
97
}
94
98
$ pod = $ pod [0 ];
@@ -129,7 +133,7 @@ ($out_dir = 'html', Bool :$debug)
129
133
;
130
134
}
131
135
}
132
- spurt " $ out_dir /$ what /$ podname .html" , pod2html($ pod , : url(& url-munge ));
136
+ spurt " $ out_dir /$ what /$ podname .html" , pod2html($ pod , : url(& url-munge ), : $ footer );
133
137
}
134
138
write-search-file(: $ out_dir );
135
139
write-index-file(: $ out_dir );
@@ -244,7 +248,7 @@ ($out_dir = 'html', Bool :$debug)
244
248
}),
245
249
);
246
250
my $ file = open : w, " $ out_dir /index.html" ;
247
- $ file . print : pod2html($ pod , : url(& url-munge ));
251
+ $ file . print : pod2html($ pod , : url(& url-munge ), : $ footer );
248
252
$ file . close ;
249
253
}
250
254
@@ -260,6 +264,21 @@ ($out_dir = 'html', Bool :$debug)
260
264
})
261
265
);
262
266
my $ file = open : w, " $ out_dir /routine/$ name .html" ;
263
- $ file . print : pod2html($ pod , : url(& url-munge ));
267
+ $ file . print : pod2html($ pod , : url(& url-munge ), : $ footer );
264
268
$ file . close ;
265
- }
269
+ }
270
+
271
+ sub footer-html () {
272
+ qq [
273
+ <div id="footer">
274
+ <p>
275
+ Generated on { DateTime . now} from the sources at
276
+ <a href="https://github.com/perl6/doc">perl6/doc on github</a>.
277
+ </p>
278
+ <p>
279
+ This is a work in progress to document Perl 6, and known to be
280
+ incomplete. Your contribution is appreciated.
281
+ </p>
282
+ </div>
283
+ ] ;
284
+ }
0 commit comments