add directory normalization

This commit is contained in:
Daniel Fichtinger 2025-06-21 16:35:42 -04:00
parent b045739b45
commit 0b4de161b5
2 changed files with 11 additions and 3 deletions

View file

@ -57,7 +57,7 @@ p {
md_item = items[0]
assert md_item.source == md_file
assert md_item.destination.name == "post.md"
assert md_item.destination.name == "index.html"
assert md_item.destination.is_relative_to(outd)
assert md_item.url == "post.md"
assert isinstance(md_item.metadata, Metadata)
@ -103,7 +103,7 @@ p {
items = discover(tmp_path, outd)
build(items)
html = (outd / "post.html").read_text()
html = (outd / "post" / "index.html").read_text()
assert html.strip() == "<h1>Hello World</h1>"
s = (outd / "static" / "style.css").read_text()
assert s.strip() == style_content.strip()