-
-
Notifications
You must be signed in to change notification settings - Fork 309
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: Generate manual from markdown using mkdocs #3849
Conversation
I was about to approve, but did a quick other check. There's two things that stood out. |
Co-authored-by: Edouard Choinière <[email protected]>
I get an error with
After deleting
|
Environmental variables are supported by mkdocs: https://www.mkdocs.org/user-guide/configuration/#environment-variables @wenzeslaus Which version of mkdocs do you have? |
please install requirements: See How To, step 1. |
Probably you have to install https://github.com/waylan/pyyaml-env-tag |
If so, we have to update requirements file accordingly. Let us now. |
I used the requirements file. I have mkdocs 1.1.2. I also added pyyaml-env-tag and reinstalled. I will try to trash everything and start over, but I think I'm still the three mkdocs plugins. |
Thanks. Starting from scratch with the pyyaml-env-tag package helped. The result (for core repo) looks great! |
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 creates a great minimal working product (assuming a conversion is done on the side). It does not break the current HTML doc build. while there is a lot of places to improve, we can work on them as PRs against main.
I have only the 2-3 comments about dependencies.
I would be also curious to see a list of special cases you encountered, i.e., what special pages we have. It is sort of hard to keep track. We have the standard options table, intro pages, family, topic and keyword lists, anything else?
Ok, requirements file updated in d45c0b6 |
Co-authored-by: Vaclav Petras <[email protected]>
Co-authored-by: Vaclav Petras <[email protected]>
@neteler No, otherwise the GRASS compilation fails (and breaks CI) since there are no MD files in repo. It can be activated in #4620 or in follow-up PR which adds generated MD files to git. |
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.
Tested on Fedora 40, the result, i.e. the generated manual pages based on markdown look great!
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.
Thanks for addressing the dependencies. I tested the previous version as discussed in my previous review.
Goal
Build user manual from Markdown using mkdocs
How to test
man/mkdocs/requirements.txt
/tmp/code.lua
:make distclean; ./configure ...; make
)(cd man; make build-mkdocs)
dist.x86_64-pc-linux-gnu/docs/mkdocs/site/index.html
in web browserTasks
Critical:
mkmarkdown.py
man
: integrate changes frommain
separate makefile rules (Markdown.make, MarkdownRules.make) ?gui/script/
compilationraster
man
--md-description
Important:
build_md.py
and indicesmeta page
comments to MD files (as YAML metadata block)g.extension
for the addonssite_name
to "GRASS GIS 8.5.0dev Reference Manual"Nice to have:
man
dir:GISBASE="/home/martin/src/grass/dist.x86_64-pc-linux-gnu" ARCH="x86_64-pc-linux-gnu" ARCH_DISTDIR="/home/martin/src/grass/dist.x86_64-pc-linux-gnu" VERSION_NUMBER=8.5.0dev VERSION_DATE=2024 python3 ./build_manual_gallery.py
) and seedist.x86_64-pc-linux-gnu/docs/markdown/site/manual_gallery.html
and https://grass.osgeo.org/grass84/manuals/manual_gallery.htmlTasks after merge(?)