doc: wikiparser: Use icons from the icons directory

Currently some icons are duplicated between the images/ directory and
images/icons/ directory. De-duplicate and only use the icons from images/icons
directory.

Tests:

- Affected sections/pages of the manual are: Firewall, Hardware and VirtualBox.
Confirm by diffing with manual generated without the code changes.

- Open all affected pages and the full manual page and confirm that images are
loading properly.

- Check all affected pages and the full manual page in FreedomBox interface and
confirm that images are loading properly.

- Check all affected sections in the generated PDF.

- Repeat tests for English and Spanish manuals.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2020-09-15 15:23:24 -04:00
1 parent 91d96b9f72
commit 57c60d9ac6
9 files changed
+3 -1

No files matched your search

+3 -1
View File
@@ -553,7 +553,9 @@ def map_local_files(path):
if 'target=' in path:
path = path.partition('target=')[2]
if '/' in path:
if path.startswith('icons/'):
pass
elif '/' in path:
path = path.rsplit('/', maxsplit=1)[1]
return f'images/{path}'