Skip to content

Commit

Permalink
Custom file path as an option for rendering markdown files for a proj…
Browse files Browse the repository at this point in the history
…ect (#155)
  • Loading branch information
openvmp authored Aug 4, 2024
1 parent c6fe5e5 commit 206d559
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion partcad/src/partcad/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,13 +1384,17 @@ def render(
def render_readme_async(self, render_cfg, output_dir):
if output_dir is None:
output_dir = self.config_dir
path = os.path.join(output_dir, "README.md")

if render_cfg is None:
render_cfg = {}
cfg = render_cfg.get("readme", {})
if isinstance(cfg, str):
cfg = {"path": cfg}
if cfg is None:
cfg = {}

path = os.path.join(output_dir, cfg.get("path", "README.md"))

exclude = cfg.get("exclude", [])
if exclude is None:
exclude = []
Expand Down

0 comments on commit 206d559

Please sign in to comment.