mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
Merge pull request #102 from 2m/fix/extension-2m
Configurable extension in links
This commit is contained in:
commit
3df2bdefdb
@ -671,10 +671,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