Skip to content

Commit

Permalink
Merge pull request #37 from python-project-templates/tkp/mod
Browse files Browse the repository at this point in the history
Allow for module override, hotfix for wrong root dir
  • Loading branch information
timkpaine authored Nov 28, 2024
2 parents 6a6079b + 9ca1dcb commit 5724b02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yardang/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def generate_docs_configuration(
default_data = os.path.split(os.getcwd())[-1]
project = project or get_config(section="name", base="project") or default_data.replace("_", "-")
title = title or get_config(section="title") or default_data.replace("_", "-")
module = module or project.replace("-", "_") or default_data.replace("-", "_")
module = module or get_config(section="module") or project.replace("-", "_") or default_data.replace("-", "_")
description = description or get_config(section="name", base="description") or default_data.replace("_", " ").replace("-", " ")
author = author or get_config(section="authors", base="project")
if isinstance(author, list) and len(author) > 0:
Expand Down
2 changes: 1 addition & 1 deletion yardang/conf.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ toctree_root = f"""```{toctree_base}

def run_copyreadme(_):
out = Path("{{source_dir}}") / "index.md"
readme = Path(root) if root else Path("{{source_dir}}") / "README.md"
readme = Path(root) if (root != "" and root != "None") else Path("{{source_dir}}") / "README.md"
if "index.md" not in pages:
out.write_text(toctree_root + "\n" + readme.read_text())

Expand Down

0 comments on commit 5724b02

Please sign in to comment.