Skip to content

Commit

Permalink
Ensure .pages does not get mkdocstrings option (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA authored Oct 10, 2022
1 parent 67794a8 commit 4be5342
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions ci_cd/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,7 @@ def write_file(full_path: Path, content: str) -> None:
print(f"Writing file: {docs_api_ref_dir / '.pages'}", flush=True)
write_file(
full_path=docs_api_ref_dir / ".pages",
content=(
pages_template.format(name="API Reference")
+ (no_docstring_template_addition if "." in full_docs_folder else "")
),
content=pages_template.format(name="API Reference"),
)

single_package = len(package_dirs) == 1
Expand Down Expand Up @@ -700,14 +697,7 @@ def write_file(full_path: Path, content: str) -> None:
print(f"Writing file: {docs_sub_dir / '.pages'}", flush=True)
write_file(
full_path=docs_sub_dir / ".pages",
content=(
pages_template.format(name=relpath.name)
+ (
no_docstring_template_addition
if str(relpath) in full_docs_folder
else ""
)
),
content=pages_template.format(name=relpath.name),
)

# Create markdown files
Expand Down Expand Up @@ -756,6 +746,7 @@ def write_file(full_path: Path, content: str) -> None:
template = md_template + (
no_docstring_template_addition
if relative_file_path in full_docs_file
or str(relpath) in full_docs_folder
else ""
)

Expand Down

0 comments on commit 4be5342

Please sign in to comment.