Skip to content

Commit

Permalink
Fix templates to work with wheel without installing
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Jan 24, 2024
1 parent 79cdfc1 commit dfe992e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- tags sent to all_tags.html is now a dict
### Fixed
- Atom feed URL
- Using wheel without installing

## [3.0.0] - 2023-12-08
### Added
Expand Down
7 changes: 4 additions & 3 deletions htmd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ def copy_file(source: BinaryIO, destination: Path) -> None:

def copy_missing_templates() -> None:
template_dir = files('htmd.example_site') / 'templates'
for template_file in sorted(template_dir.iterdir()):
file_name = template_file.name
copy_file(template_file, Path('templates') / file_name)
with as_file(template_dir) as template_path:
for template_file in sorted(template_path.iterdir()):
file_name = template_file.name
copy_file(template_file, Path('templates') / file_name)


def copy_site_file(directory: Path, filename: str) -> None:
Expand Down

0 comments on commit dfe992e

Please sign in to comment.