mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
doc: wikiparser: Fix issue with running parser outside doc/ dir
Use a path relative to the script path when checking for existence of manual pages. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -694,7 +694,8 @@ def resolve_url(url, context):
|
||||
link_language = DEFAULT_LANGUAGE
|
||||
|
||||
# Check for local file and use local path
|
||||
file_ = Path(f'manual/{link_language}') / (link_page + '.raw.wiki')
|
||||
file_ = Path(__file__).parent.parent
|
||||
file_ = file_ / f'manual/{link_language}' / (link_page + '.raw.wiki')
|
||||
if file_.exists():
|
||||
help_base = LOCAL_BASE.format(lang=link_language)
|
||||
url = f'{help_base}{link_page}'
|
||||
|
||||
Reference in new issue
Block a user