Skip to content

Commit

Permalink
Replace SOURCEURL, fix #111
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniogamiz committed Aug 27, 2019
1 parent 4bd76ea commit 6af25b2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/Perl6/Documentable/To/HTML/Wrapper.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ method menu($selected, $pod-path?) {
.subst('EDITURL', $edit-url)
}

method footer() {
$!footer.subst(/DATETIME/, ~DateTime.now.utc.truncated-to('seconds'));
method footer($pod-path) {
my $new-footer = $!footer.subst(/DATETIME/, ~DateTime.now.utc.truncated-to('seconds'));
if ( $pod-path ) {
my $source-path = $.config.pod-root-path ~ $pod-path;
$new-footer = $new-footer.subst(/SOURCEURL/, $source-path);
$new-footer = $new-footer.subst(/PODPATH/, $pod-path);
}

$new-footer;
}

method render($pod, $selected = '', :$pod-path?) {
Expand All @@ -97,7 +104,7 @@ method render($pod, $selected = '', :$pod-path?) {
url => &!rewrite,
head => $!head,
header => self.menu($selected, $pod-path),
footer => self.footer,
footer => self.footer($pod-path),
default-title => $!title-page,
css-url => ''
)
Expand Down
38 changes: 38 additions & 0 deletions type-graph.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[basic]
class Perl6::Documentable
class Perl6::Documentable::Registry
class Perl6::Documentable::Primary is Perl6::Documentable
class Perl6::Documentable::Secondary is Perl6::Documentable
class Perl6::Documentable::Index is Perl6::Documentable
class Perl6::Documentable::Config
class Perl6::Documentable::Heading::Actions
class Perl6::Documentable::Heading::Grammar
class Perl6::Documentable::Search

[basic]
class Perl6::Documentable::DocPage::Factory
class Perl6::Documentable::DocPage::Index
class Perl6::Documentable::DocPage::Index::Language is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Index::Programs is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Index::Type is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::SubIndex::Type is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Index::Routine is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::SubIndex::Routine is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Secondary is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Primary::Type is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Primary::Language is Perl6::Documentable::DocPage
class Perl6::Documentable::DocPage::Primary::Programs is Perl6::Documentable::DocPage
class Perl6::Documentable::To::HTML::Wrapper

[basic]
role Perl6::Documentable::DocPage

[exceptions]
class X::Documentable::TitleNotFound is Exception
class X::Documentable::SubtitleNotFound is Exception
class X::Documentable::MissingMetadata is Exception
class X::Documentable::Config::InvalidConfig is Exception
class X::Documentable::TypeNotFound is Exception

[basic]
enum Kind

0 comments on commit 6af25b2

Please sign in to comment.