Skip to content

Commit

Permalink
Merge pull request #44 from timothycrosley/feature/fix-issue-43-modul…
Browse files Browse the repository at this point in the history
…e-dash

Feature/fix issue 43 module dash
  • Loading branch information
timothycrosley authored Sep 22, 2019
2 parents c006a41 + 903c8e0 commit b393d8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ see the [Installation QuickStart](https://timothycrosley.github.io/portray/docs/

Changelog
=========
## 1.3.1 - September 22 2019
- Fixed [Issue 43](https://github.com/timothycrosley/portray/issues/43) - Automatically remap `-` to `_` when attempting to auto-determine module name.

## 1.3.0 - September 15 2019
- Potentially backward compatibility breaking performance optimization: portray now only renders root project files + the specified documentation directory + any specified extra_dirs.
If a previously utilized file used to be auto included, but is no longer, you can force its inclusion by adding its directory to `extra_dirs.`
Expand Down
2 changes: 1 addition & 1 deletion portray/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def project(directory: str, config_file: str, **overrides) -> dict:
project_config.update(toml(os.path.join(directory, config_file)))
project_config.update(overrides)

project_config.setdefault("modules", [os.path.basename(os.getcwd())])
project_config.setdefault("modules", [os.path.basename(os.getcwd()).replace("-", "_")])
project_config.setdefault("pdocs", {}).setdefault("modules", project_config["modules"])

project_config["mkdocs"] = mkdocs(directory, **project_config.get("mkdocs", {}))
Expand Down

0 comments on commit b393d8e

Please sign in to comment.