summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-19 19:43:35 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-19 19:43:35 +0200
commitcebadfcfbe74a9b892854e860d6d50565dffa7be (patch)
tree24a8d93acd60c22e1f94a3c2596ee39b3dfac174
parenta3324b7e71ec48daab81981e7d85967a590d4f79 (diff)
downloadgit2hugo-cebadfcfbe74a9b892854e860d6d50565dffa7be.tar.gz
g2h: Point content out dir to content-out and not out-root
-rw-r--r--src/g2h/cli.py5
1 files 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: