From b26b6eea155626664e2fb1c91177a96e2eafad5d Mon Sep 17 00:00:00 2001 From: pho4cexa Date: Sun, 8 Jan 2023 09:37:46 -0800 Subject: [PATCH] bit more in the readme about new template variables --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c57477..c08fdcc 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,11 @@ Environment variables may also be used for configuration, and take precedence ov Your repository "name" is, by default, the name of the directory as specified in the first argument provided to `repo2html`. -This affects the template variables: -This does not affect the template variables: +You may override this if you prefer a more human-friendly name, for example: + +`git config repo2html.name "Git Repository To Hypertext Markup Language Generator"` + +This affects the template variable `repository_name` but not `repository_path`. ### Description @@ -142,15 +145,17 @@ This is a helper intended for use when [building a git forge](#creating-a-git-fo It specifies the filesystem path to the directory containing (possibly a hierarchy of) html output directories. +This affects the template variables `repository_path`, `repository_path_parent`, and `repository_ancestors`, when the repo is found to be in a subdirectory of `ForgeRoot`. + Example: With forgeroot unset, the command `repo2html /var/www/repos/mike/projecta/repo1 /path/to/templates` -will set the variable repo_path to `repo1` +will set the variable `repository_path` to `repo1` With forgeroot set to `/var/www/repos`, the command `repo2html /var/www/repos/mike/projecta/repo1 /path/to/templates` -will set the variable repo_path to `mike/projecta/repo1` +will set the variable `repository_path` to `mike/projecta/repo1` When your forge is built with a shared git user, it's convenient to use --global to specify this just once, like: