Compare commits

..

2 Commits

Author SHA1 Message Date
c2f147e3f9 Merge pull request 'fix: search urls' (#4987) from fix/search into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #4987
2025-04-27 15:15:30 +00:00
Darragh Elliott
c88443a633 fix: search urls
All checks were successful
continuous-integration/drone/pr Build is passing
2025-04-27 16:12:41 +01:00

View File

@ -46,7 +46,7 @@ def _process_file(file: Path, stopwords: set[str]) -> dict:
filter(lambda tag: tag.get("key") != "front-page", xslt_root.xpath("//tag")),
)
return {
"url": f"/{file.with_suffix('.html')}",
"url": f"/{file.with_suffix('.html').relative_to(file.parents[-2])}",
"tags": " ".join(tags),
"title": (
xslt_root.xpath("//html//title")[0].text