rename repo_summary to summary to match other variables
This commit is contained in:
+14
-14
@@ -331,15 +331,15 @@ repo_list = "repos.html"
|
||||
# data (commits, branches, etc) available.
|
||||
#
|
||||
# This template executes one time per repository.
|
||||
repo_summary = "summary.html"
|
||||
summary = "summary.html"
|
||||
|
||||
# Template responsible for displaying the commit history.
|
||||
#
|
||||
# This template is evaluated with the same data as `repo_summary`. If
|
||||
# the `paginate_history` setting is non-zero, this may be called
|
||||
# several times with the `history` template variable reduced to the
|
||||
# requested page size, and with a `page` template variable provided to
|
||||
# identify the current, previous, and next pages.
|
||||
# This template is evaluated with the same data as `summary`. If the
|
||||
# `paginate_history` setting is non-zero, this may be called several
|
||||
# times with the `history` template variable reduced to the requested
|
||||
# page size, and with a `page` template variable provided to identify
|
||||
# the current, previous, and next pages.
|
||||
#
|
||||
# This template executes at least one time per repository, or several
|
||||
# times if paginated.
|
||||
@@ -355,11 +355,11 @@ commit = "commit.html"
|
||||
|
||||
# Template responsible for displaying the repo branches.
|
||||
#
|
||||
# This template is evaluated with the same data as `repo_summary`. If
|
||||
# the `paginate_branches` setting is non-zero, this may be called
|
||||
# several times with the `branches` template variable reduced to the
|
||||
# requested page size, and with a `page` template variable provided to
|
||||
# identify the current, previous, and next pages.
|
||||
# This template is evaluated with the same data as `summary`. If the
|
||||
# `paginate_branches` setting is non-zero, this may be called several
|
||||
# times with the `branches` template variable reduced to the requested
|
||||
# page size, and with a `page` template variable provided to identify
|
||||
# the current, previous, and next pages.
|
||||
#
|
||||
# This template executes at least one time per repository, or several
|
||||
# times if paginated.
|
||||
@@ -375,8 +375,8 @@ branch = "branch.html"
|
||||
|
||||
# Template responsible for displaying the repo tags.
|
||||
#
|
||||
# This template is evaluated with the same data as `repo_summary`. If
|
||||
# the `paginate_tags` setting is non-zero, this may be called several
|
||||
# This template is evaluated with the same data as `summary`. If the
|
||||
# `paginate_tags` setting is non-zero, this may be called several
|
||||
# times with the `tags` template variable reduced to the requested
|
||||
# page size, and with a `page` template variable provided to identify
|
||||
# the current, previous, and next pages.
|
||||
@@ -450,7 +450,7 @@ error = "404.html"
|
||||
[gitsy_outputs]
|
||||
path = "rendered/"
|
||||
repo_list = "index.html"
|
||||
repo_summary = "%REPO%/index.html"
|
||||
summary = "%REPO%/index.html"
|
||||
history = "%REPO%/history%PAGE%.html"
|
||||
commit = "%REPO%/commit/%ID%.html"
|
||||
branches = "%REPO%/branches%PAGE%.html"
|
||||
|
||||
+2
-2
@@ -381,11 +381,11 @@ impl GitsyGenerator {
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(templ_file) = self.settings.templates.repo_summary.as_deref() {
|
||||
if let Some(templ_file) = self.settings.templates.summary.as_deref() {
|
||||
match tera.render(templ_file, &local_ctx) {
|
||||
Ok(rendered) => {
|
||||
repo_bytes +=
|
||||
self.write_rendered(&self.settings.outputs.repo_summary(Some(&parsed_repo), None), &rendered);
|
||||
self.write_rendered(&self.settings.outputs.summary(Some(&parsed_repo), None), &rendered);
|
||||
}
|
||||
Err(x) => match x.kind {
|
||||
_ => error!("ERROR: {:?}", x),
|
||||
|
||||
+3
-3
@@ -114,7 +114,7 @@ impl GitsyCli {
|
||||
pub struct GitsySettingsTemplates {
|
||||
pub path: PathBuf,
|
||||
pub repo_list: Option<String>,
|
||||
pub repo_summary: Option<String>,
|
||||
pub summary: Option<String>,
|
||||
pub history: Option<String>,
|
||||
pub commit: Option<String>,
|
||||
pub branches: Option<String>,
|
||||
@@ -141,7 +141,7 @@ pub struct GitsySettingsOutputs {
|
||||
pub path: PathBuf,
|
||||
pub cloned_repos: Option<String>,
|
||||
pub repo_list: Option<String>,
|
||||
pub repo_summary: Option<String>,
|
||||
pub summary: Option<String>,
|
||||
pub history: Option<String>,
|
||||
pub commit: Option<String>,
|
||||
pub branches: Option<String>,
|
||||
@@ -208,7 +208,7 @@ macro_rules! output_path_fn {
|
||||
#[rustfmt::skip]
|
||||
impl GitsySettingsOutputs {
|
||||
output_path_fn!(repo_list, GitObject, full_hash, false, "index.html");
|
||||
output_path_fn!(repo_summary, GitObject, full_hash, false, "%REPO%/index.html");
|
||||
output_path_fn!(summary, GitObject, full_hash, false, "%REPO%/index.html");
|
||||
output_path_fn!(history, GitObject, full_hash, false, "%REPO%/history%PAGE%.html");
|
||||
output_path_fn!(commit, GitObject, full_hash, false, "%REPO%/commit/%ID%.html");
|
||||
output_path_fn!(branches, GitObject, full_hash, false, "%REPO%/branches%PAGE%.html");
|
||||
|
||||
Reference in New Issue
Block a user