-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Integrate grass-addons into mkdocs doc #5158
Comments
What is not clear to me here is how keywords should handled. I have to do local changes to the keywords script to make it work, i.e., have keywords from addons in the keyword index. Then, I still need to fix links in the addons dir to point to the parent directory. I can't find that code anywhere. |
Probably @tmszi knows more about the keywords magic? |
I think I found it. The missing piece of puzzle for me was |
Current state on mainKeywordsKeywords generally work in both directions. There are some anchor naming issues (mkdocs drops special characters from anchor while our custom tooling for HTML preserved them):
Additionally, there is a number of broken links reported by mkdocs which are mostly also in the HTML doc (passing silently) related to non-existent topics, addon tools, missing files, core tools. However, there is couple of issues which definitely look new, for example:
Source code linksSource code and history links work. The commit does not, Here it is a link which always goes to grass repo, never to grass-addons, and it is always the latest repo commit, not the specific dir commit, even for the core tools (so issue not necessarily related to addons). This might be more the CI setup issue, than the Markdown vs HTML issue (or both). Edit buttonWorks for core tools, but not for addons. FooterLinks in footer of addon tools go to addons dir, not to to |
I have a general opinion on addons docs built in the main repo. I'm not sure if it won't be causing us more problems by coupling our high activity repo, with the low activity grass-addons. Repeatedly building addons in the main repo seems like a waste to me. In the best of worlds, a solution where each of the repos could be independent, and each could build the docs and upload them and still being usable on the web (not too separated, still integrated together) would be ideal. |
In this case, the integration of the addons into the keyword index, full index and other overview pages would no longer be possible. That was actually a great achievement, done esp. by @tmszi. This said: it used to happen on the server, once a day. Doing everything in GHA changes the situation. So we need to find the best of the two worlds... |
I understand things might not be possible, I didn't evaluate the feasibility, that's why I didn't object myself really hard in that effort. It's only a dream. |
I'm open to suggestions. I just don't have a better idea at this point. Not completely wasted though, it is good to check that addons compile after change on main, but that's of course not a deep test. The documentation also goes online for both and is influenced by combination of both. Most changes won't matter, but that's the case always. What I don't like is actually the possibility to break main with addons change. |
What is needed to make it on par with the current HTML doc:
addons/name.html
cronjobs: Add Markdown and generalize addon build grass-addons#1330grass.osgeo.org/addons/grass$MAJOR/modules.xml
byutils/cronjobs_osgeo_lxd/build-xml.py
inutils/cronjobs_osgeo_lxd/cron_grass_preview_build_binaries.sh
Optional tasks:
How to get it
CI
Grab mkdocs site artifact from main, related PR, or the Action tab / Documentation.
Locally
Assumes you have core repo in grass and addons repo in grass-addons.
Assumes you are in environment with mkdocs.
Compile and install:
Get the get version numbers:
Set path to compiled binary:
Compile addons:
Path to where the addons doc should be:
MKDOCS_DIR="$(grass --config path)/docs/mkdocs"
Copy the relevant part of compiled doc:
Rebuild keywords:
The workflow is similar to the CI code from #5152.
The text was updated successfully, but these errors were encountered: