fix: create previews when target is current page (#330)

Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
Timothée Mazzucotelli
2026-02-04 15:35:50 +01:00
committed by GitHub
parent 6643eb922f
commit 7e6ef17382
+4 -1
View File
@@ -112,8 +112,11 @@ class PreviewProcessor(Treeprocessor):
if url.scheme or url.netloc:
continue
# An empty url.path means we're targetting the current page
url_path = url.path or processor.path
# Include, if filter matches
path = resolve(processor.path, url.path)
path = resolve(processor.path, url_path)
if path and filter(path):
el.set("data-preview", "")