Skip to content

Commit

Permalink
faster and better way to connect to docsets
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Deubel <[email protected]>
  • Loading branch information
maxd-nordic committed May 24, 2024
1 parent b106a63 commit 9c7aec3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 52 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ jobs:

- name: Fix links between docsets
working-directory: ncs/nrf/doc/_build/docsets/
run: python3 ../../_scripts/connect_docsets.py
run: |
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./nrfxlib/([^"]*)"#\1 href=\"\2../../../../../nrfxlib.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./mcuboot/([^"]*)"#\1 href=\"\2../../../../../mcuboot.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./matter/([^"]*)"#\1 href=\"\2../../../../../matter.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./nrfx/([^"]*)"#\1 href=\"\2../../../../../nrfx.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./kconfig/([^"]*)"#\1 href=\"\2../../../../../kconfig.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./nrf/([^"]*)"#\1 href=\"\2../../../../../nrf.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./zephyr/([^"]*)"#\1 href=\"\2../../../../../zephyr.docset/Contents/Resources/Documents/\3"#g' {} +
find . -type f -name "*.html" -exec sed -i -E 's#(a|class=\"reference external\") href="([^"]*)\.\./tfm/([^"]*)"#\1 href=\"\2../../../../../tfm.docset/Contents/Resources/Documents/\3"#g' {} +
- name: Compress Docsets
working-directory: ncs/nrf/doc/_build
Expand Down
51 changes: 0 additions & 51 deletions doc/_scripts/connect_docsets.py

This file was deleted.

0 comments on commit 9c7aec3

Please sign in to comment.