mirror of
https://github.com/zensical/zensical.git
synced 2026-05-03 17:40:31 +00:00
fix: create previews when target is current page (#330)
Signed-off-by: Timothée Mazzucotelli <dev@pawamoy.fr>
This commit is contained in:
committed by
GitHub
parent
6643eb922f
commit
7e6ef17382
@@ -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", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user