-
-
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
docs: Added material mkdocs tags plugin #5153
Conversation
While just using the tags instead of a currently working custom keywords system is not a priority, and some pieces will need to me preserved for keeping functioning URLs (if someone links https://grass.osgeo.org/grass-stable/manuals/keywords.html), this may help solving keywords for addons which currently work for HTML, but not for Markdown. However, given this needs the addon situation to be resolved, let's wait with this a bit to see how #5152 develops. Example with a addon-only keyword is v.vect.stats.multi.md with keyword 'columns'. |
This is an easy fix. We just need to leave the keyword tag in the header for now.
I'll need to see this because I'm not following.
I agree this can wait until we resolve the addons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, but I meant to request changes for the footer.
The Tags index in the footer doesn't work, links to ./addons/tags.html, but that's the same for keywords. |
This is fixed now. They needed to be set not to use relative paths that why it was picking up the sub-directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me as far as functionality. Next step is to decide on the details and interaction between custom keywords representation and the tags.
The TOC on tags page does not work, but it does not work on the keywords one either. The solution in the HTML doc was TOC by first letter, but I don't know if a TOC is even needed here.
I think the footer needs some other solution (some which will work for local files and multiple versions), but it is not directly related, so let's address that separately.
This uses existing keywords in Material MkDocs tags plugin to show tag. The tags mirror the keywords in terms of list and index, but are simpler, completely driven by mkdocs without any needed for custom code. The tool family and topic logic is obviously not include. More evaluation and de-duplication with keywords is needed (as a next step).
Adds tags to parser output which are just keywords but in full YAML syntax (mkdocs consumes tags by default, but can be configured).
Uses absolute URL instead of relative links in footer to make links from addons work.
Addresses Issue #5091
This pull request includes multiple changes to improve the documentation and tagging system in the project.
Modified md keyword generation in documentation:
lib/gis/parser_rest_md.c
: Changed the keyword output to use "tags" instead, and adjusted the format to include brackets.lib/gis/parser_rest_md.c
: Removed the conditional keyword section to streamline the output format.Updates to build process and documentation files:
man/Makefile
: Addedtags.md
to the list of documentation source files and ensured it gets installed correctly. [1] [2]man/mkdocs/mkdocs.yml
: Enabled thetags
plugin in the MkDocs configuration to support tag-based navigation.man/mkdocs/overrides/partials/footer.html
: Updated the footer to include a link to the new Tags index.man/mkdocs/tags.md
: Added a new file to list relevant tags for the documentation.