Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for module override, hotfix for wrong root dir #37

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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