diff --git a/.ci/generateIndex.py b/.ci/generateIndex.py index 6498ccd9f8f92aaece199706468fecc99430cd4e..c293f4a1a02e92482e4540bf4c71593b2bf9f790 100644 --- a/.ci/generateIndex.py +++ b/.ci/generateIndex.py @@ -11,9 +11,17 @@ def line_prepender(filename, line): def build_link(title, href): # strip the number of the title - if ('handbook:1-general' in href) or ('handbook:2-additional' in href): + if ('handbook-1-general' in href) or ('handbook-2-additional' in href) or ('handbook-3-annexes' in href): title = re.sub('[0-9.]', '', title).strip() + # remove sym link reference in href + if ('handbook-1-general' in href): + href = href.replace('handbook-1-general', 'handbook').strip() + elif ('handbook-2-additional' in href): + href = href.replace('handbook-2-additional', 'handbook').strip() + elif ('handbook-3-annexes' in href): + href = href.replace('handbook-3-annexes', 'handbook').strip() + return f'\t\t\t<li><a href="{href}">{title}</a></li>\n' def build_section_start(title, shortcut):