From cebadfcfbe74a9b892854e860d6d50565dffa7be Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 19 Sep 2025 19:43:35 +0200 Subject: g2h: Point content out dir to content-out and not out-root --- src/g2h/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/g2h/cli.py b/src/g2h/cli.py index 9eb869c..d61b71b 100644 --- a/src/g2h/cli.py +++ b/src/g2h/cli.py @@ -8,7 +8,6 @@ def parse_args(): parser = argparse.ArgumentParser( prog='g2h', description='Convert a git repository into markdown files Hugo can understand.') - # TODO: Defaults for these two values should be $PWD. parser.add_argument('--repo', help='Path to the root of git repository', default=os.getcwd()) parser.add_argument('--out', help='Path to where the generated files should be stored', default=os.getcwd()) parser.add_argument('--name', help='Name of the project. Default: directory name of repo') @@ -27,7 +26,9 @@ def main(): project_name = args.name if args.name is not None else os.path.basename(args.repo) tags = sorted(git.get_tags(), key=lambda t: t.commit.committed_date, reverse=True) - factory = PageFactory(args.out, project_name, args.content_subdir) + content_out = os.path.join(args.out, 'content', args.content_subdir) + + factory = PageFactory(content_out, project_name, args.content_subdir) factory.new_overview(branches, tags, head).render() factory.new_log(commits, branches, tags, head).render() for commit in commits: -- cgit v1.2.3