build: Allow separate build of Markdown and HTML keywords#5177
Merged
wenzeslaus merged 4 commits intoOSGeo:mainfrom Feb 25, 2025
Merged
build: Allow separate build of Markdown and HTML keywords#5177wenzeslaus merged 4 commits intoOSGeo:mainfrom
wenzeslaus merged 4 commits intoOSGeo:mainfrom
Conversation
The original Markdown support from OSGeo#3849 breaks generating addon keywords on the doc build server because the parameter for addons used in the build script was ignored. The addon keywords are currently integated for 8.4, but are not integrated into the index for 8.5. This update should fix that. The new code allows for the original usage of the script where documentation directories are supplied as parameters. This assumes HTML documentation and corresponds to the usage on the build server. The intended usage from OSGeo#3849 for the new build where both Markdown and HTML are build using the script without the build system providing parameters is preserved. Finally, with parameters md <core-path> <addon-path>, the script allows for creating Markdown keyword list with optionally integrated addons using the paths provided. Unfortunately, ARCH_DISTDIR still needs to be set even in this case because it used directly a import time and a lot of other code uses that variable. This also adds a main function to separate the variables and handle the parameters in one place. Additionally, it creates the dict for the first letter TOC only for HTML where it is used (which allows the script to execute without the fixes for empty keyword list from OSGeo#5175).
This was referenced Feb 21, 2025
cwhite911
approved these changes
Feb 24, 2025
…rch (just because it is possible). Fix logs dir path.
Member
Author
|
The addon keywords are now part of the generated keyword index in mkdocs: In the CI, the following, rather trivial, change is enabled by this PR: - grass/man/build_keywords.py "$MKDOCS_DIR/source/addons"
+ grass/man/build_keywords.py md "$MKDOCS_DIR/source" "$MKDOCS_DIR/source/addons"It should also bring back properly interlinked core and addon keywords in HTML docs on the server for the preview doc build which was broken after #3849 (initial Markdown build PR). The The sever impact is untested by me, but now the CI Documentation workflow builds with keywords and the mkdocs site can be downloaded as an artifact, and |
petrasovaa
approved these changes
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The original Markdown support from #3849 breaks generating addon keywords on the doc build server because the parameter for addons used in the build script was ignored. The addon keywords are currently integrated for 8.4, but are not integrated into the index for 8.5. This update should fix that.
The new code allows for the original usage of the script where documentation directories are supplied as parameters. This assumes HTML documentation and corresponds to the usage on the build server.
The intended usage from #3849 for the new build where both Markdown and HTML are build using the script without the build system providing parameters is preserved.
Finally, with parameters md , the script allows for creating Markdown keyword list with optionally integrated addons using the paths provided. Unfortunately, ARCH_DISTDIR still needs to be set even in this case because it used directly a import time and a lot of other code uses that variable.
This also adds a main function to separate the variables and handle the parameters in one place. Additionally, it creates the dict for the first letter TOC only for HTML where it is used (which allows the script to execute without the fixes for empty keyword list from #5175).