forked from rho_n/hpr_generator
Add MACRO media_baseurl
Allow the audio files to be served from a different host
This commit is contained in:
parent
0edf9cc5a2
commit
c817e3a17a
@ -125,6 +125,8 @@ sub main {
|
|||||||
# from the generated list of pages.
|
# from the generated list of pages.
|
||||||
@page_args= grep { $_ ne 'DBI' } @page_args;
|
@page_args= grep { $_ ne 'DBI' } @page_args;
|
||||||
@page_args= grep { $_ ne 'root_template' } @page_args;
|
@page_args= grep { $_ ne 'root_template' } @page_args;
|
||||||
|
@page_args= grep { $_ ne 'media_hostname' } @page_args;
|
||||||
|
|
||||||
};
|
};
|
||||||
foreach my $page_arg (@page_args) {
|
foreach my $page_arg (@page_args) {
|
||||||
my %parsed_arg = parse_page_arg($page_arg);
|
my %parsed_arg = parse_page_arg($page_arg);
|
||||||
@ -142,6 +144,10 @@ sub main {
|
|||||||
$page_config->{'baseurl'} = $config{root_template}{baseurl};
|
$page_config->{'baseurl'} = $config{root_template}{baseurl};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (exists $config{root_template}{media_hostname}) {
|
||||||
|
$page_config->{'media_hostname'} = $config{root_template}{media_hostname};
|
||||||
|
}
|
||||||
|
|
||||||
if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') {
|
if ($page_config->{'multipage'} && $page_config->{'multipage'} eq 'true') {
|
||||||
if (scalar @{$parsed_arg{'ids'}} == 1) {
|
if (scalar @{$parsed_arg{'ids'}} == 1) {
|
||||||
@{$parsed_arg{'ids'}} = get_ids_from_db($tt, \$page_config);
|
@{$parsed_arg{'ids'}} = get_ids_from_db($tt, \$page_config);
|
||||||
|
@ -39,6 +39,12 @@
|
|||||||
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
|
<!--% IF baseurl %-->./<!--% ELSE %-->/<!--% END %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
|
||||||
|
<!--% MACRO media_baseurl(baseurl, media_hostname) BLOCK %-->
|
||||||
|
<!--% IF media_hostname %-->
|
||||||
|
https://<!--% media_hostname %-->/<!--% ELSE %-->
|
||||||
|
<!--% baseurl %--><!--% END %-->
|
||||||
|
<!--% END %-->
|
||||||
|
|
||||||
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
|
<!--% MACRO step_navigation(baseurl, links, folder) BLOCK %-->
|
||||||
<!--% IF folder == "" %-->
|
<!--% IF folder == "" %-->
|
||||||
<!--% folder = hpr %-->
|
<!--% folder = hpr %-->
|
||||||
|
Loading…
Reference in New Issue
Block a user