Allow page to configure root_template in configuration file

RSS commits will be broken before this commit.
This commit is contained in:
Roan Horning 2022-08-17 19:13:42 -04:00
parent 5b48b91e99
commit 41a18300eb
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -131,7 +131,13 @@ sub main {
if (exists($config{$parsed_arg{'page'}})) {
my $page_config = $config{$parsed_arg{'page'}};
$page_config->{'page'} = $parsed_arg{'page'};
$page_config->{'root_template'} = $config{root_template}{content};
# Set page's root_template to the default root_template if the
# page root_template property is not set in the configuration file.
if (exists $page_config->{'root_template'} == 0) {
$page_config->{'root_template'} = $config{root_template}{content};
}
if (exists $config{root_template}{baseurl}) {
$page_config->{'baseurl'} = $config{root_template}{baseurl};
}