-
-
Notifications
You must be signed in to change notification settings - Fork 339
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: mkdocs edit and view on github #5114
Conversation
I chose a different approach to get the tool paths by extracting their github url from the generated md files in I know we could just add our own edit on github button at the bottom of the page like we are currently doing to add the Source Code section.. Available at: r.volume source code (history) But I'm trying to embrace the material mkdocs ecosystem by doing it the way it's design. |
@landam do you know a better way to do this? |
This is ready for review. |
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.
Works great!
This PR is a replacement for PR #5104 addressing Issue #5103.
This pull request includes several changes to the
man/Makefile
and related files to enhance the documentation build process and add new features for editing and viewing on GitHub. The most important changes include adding new scripts and hooks, updating themkdocs.yml
configuration, and modifying HTML templates for custom actions.Enhancements to the documentation build process:
man/Makefile
: Added new entries forgh-paths.yml
andhook_list_scripts.py
, and created a target to list Markdown file contents. [1] [2]Configuration updates:
man/mkdocs/mkdocs.yml
: Added repository information, new hooks, and updated the theme to include content actions for editing and viewing on GitHub. [1] [2]Template modifications:
man/mkdocs/overrides/partials/actions.html
: Added a custom actions template to handle different tool categories and generate custom edit URLs.New script:
man/mkdocs/scripts/hook_list_scripts.py
: Introduced a new script to read and store tool names fromgh-paths.yml
into the Mkdocs extra configuration directly into GitHub to view and edit documentation sources.Know Issue
<tool_directory>/<tool_name>/<prefix>.<tool_name>.md
convention (raster/r.watershed/r.watershed.md) or are not in/scripts/**/*.md
do not work.