Skip to content

Commit 9ca1dcb

Browse files
committed
Allow for module override, hotfix for wrong root dir
1 parent 6a6079b commit 9ca1dcb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

yardang/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def generate_docs_configuration(
3838
default_data = os.path.split(os.getcwd())[-1]
3939
project = project or get_config(section="name", base="project") or default_data.replace("_", "-")
4040
title = title or get_config(section="title") or default_data.replace("_", "-")
41-
module = module or project.replace("-", "_") or default_data.replace("-", "_")
41+
module = module or get_config(section="module") or project.replace("-", "_") or default_data.replace("-", "_")
4242
description = description or get_config(section="name", base="description") or default_data.replace("_", " ").replace("-", " ")
4343
author = author or get_config(section="authors", base="project")
4444
if isinstance(author, list) and len(author) > 0:

yardang/conf.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ toctree_root = f"""```{toctree_base}
114114

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

0 commit comments

Comments
 (0)