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>
|
Before Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 758 B |
|
Before Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 758 B |
@ -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}'
|
||||
|
||||