mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
Configurable extenion in links
This commit is contained in:
parent
46c77076ab
commit
8ec0d23a3b
@ -683,10 +683,11 @@ class Parser:
|
||||
)
|
||||
continue
|
||||
else:
|
||||
extension_in_links = self.config.get("extension_in_links", True)
|
||||
a["href"] = (
|
||||
self.get_page_slug(sub_page_href)
|
||||
self.get_page_slug(sub_page_href, extension=extension_in_links)
|
||||
if sub_page_href != self.index_url
|
||||
else "index.html"
|
||||
else ("index.html" if extension_in_links else "")
|
||||
)
|
||||
subpages.append(sub_page_href)
|
||||
log.debug(f"Found link to page {a['href']}")
|
||||
|
Loading…
Reference in New Issue
Block a user