We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34a0be8 commit deaa98dCopy full SHA for deaa98d
lib/App/Aphra/File.pm
@@ -7,6 +7,7 @@ use File::Path 'make_path';
7
use File::Copy;
8
use Text::FrontMatter::YAML;
9
use Path::Tiny ();
10
+use URI;
11
12
has [qw[path name extension ]] => (
13
isa => 'Str',
@@ -88,6 +89,19 @@ sub full_name {
88
89
return $full_name;
90
}
91
92
+sub uri {
93
+ my $self = shift;
94
+
95
+ my $uri = $self->app->uri;
96
+ my $path = $self->destination_dir;
97
+ my $base = $self->app->site_vars->{base};
98
+ $path =~ s/^$base//;
99
+ $uri .= $path . $self->output_name;
100
+ $uri =~ s/index\.html$//;
101
102
+ return URI->new($uri);
103
+}
104
105
sub process {
106
my $self = shift;
107
t/data1/site.yml
@@ -1 +1,2 @@
1
uri : https://example.com/
2
+base : docs
0 commit comments