summaryrefslogtreecommitdiffstats
path: root/g2h/cli.py
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-08-24 17:58:29 +0200
committerChristoph Schlosser <christoph@linux.com>2025-08-24 18:17:07 +0200
commitd8d67f6ba38388aecbf66d791432d5cd3aa8db6e (patch)
tree1cf1c79460d80addcc3e7dcf43b6ae2ad42cacca /g2h/cli.py
parentb921db2d6504cee332cf54346dd1c81d034d3acf (diff)
downloadgit2hugo-d8d67f6ba38388aecbf66d791432d5cd3aa8db6e.tar.gz
g2h: Add --content-subdir arg
Diffstat (limited to 'g2h/cli.py')
-rw-r--r--g2h/cli.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/g2h/cli.py b/g2h/cli.py
index 3d7028e..b4c1c2b 100644
--- a/g2h/cli.py
+++ b/g2h/cli.py
@@ -12,6 +12,7 @@ def parse_args():
parser.add_argument('repo_path', help='Path to the root of git repository')
parser.add_argument('out_dir', help='Path to where the generated files should be stored')
parser.add_argument('--name', help='Name of the project. Default: directory name of repo')
+ parser.add_argument('--content-subdir', help='Subdir(s) where the page will be served from. Default: None', default='')
return parser.parse_args()
@@ -25,7 +26,7 @@ def main():
project_name = args.name if args.name is not None else os.path.basename(args.repo_path)
tags = sorted(git.get_tags(), key=lambda t: t.commit.committed_date, reverse=True)
- factory = PageFactory(args.out_dir, project_name)
+ factory = PageFactory(args.out_dir, project_name, args.content_subdir)
factory.new_overview(branches, tags).render()
factory.new_log(commits, branches, tags).render()
for commit in commits: