[GRASS-git] [OSGeo/grass] bd67b9: doc: Enable Markdown doc compilation (#5048)

Vaclav Petras noreply at github.com
Tue Feb 11 11:24:24 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: bd67b98c0880c588e271f114b749ae14fa3e0466
      https://github.com/OSGeo/grass/commit/bd67b98c0880c588e271f114b749ae14fa3e0466
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-02-11 (Tue, 11 Feb 2025)

  Changed paths:
    M display/d.barscale/Makefile
    M display/d.graph/Makefile
    M display/d.northarrow/Makefile
    M doc/Makefile
    M gui/icons/Makefile
    M gui/wxpython/docs/Makefile
    M gui/wxpython/gmodeler/Makefile
    M include/Make/DB.make
    M include/Make/GuiScript.make
    M include/Make/Html.make
    M include/Make/Multi.make
    M man/Makefile
    M man/build_class_graphical.py
    M man/build_graphical_index.py
    M man/build_topics.py
    M raster/Makefile
    M raster/r.colors/Makefile
    M scripts/g.extension/g.extension.py
    M utils/mkdocs.py
    M utils/thumbnails.py

  Log Message:
  -----------
  doc: Enable Markdown doc compilation (#5048)

The initial commit simply uncomments the Markdown compilation lines from #3849. (This requires the actual Markdown files to be present which are now part of the source code.)

Subsequent commits add fixes of the compilation (missing tools, files, etc.):

* Add compilation of multi-program directories like r.colors, r.mapcalc, and r3.flow
* Generate colortable thumbnails. This makes the script little more general and assumes that HTML will be eventually removed (the thumbnails are generated twice now, once for HTML and once of Markdown).
* Copy barscale and northarrow files for Markdown doc source.
* Presence of spaces vs underscores in key may differ between HTML and Markdown, so always do replacements.
* Do not add dash to visible text for keyword. Additionally, remove underscore just like in the HTML version.
* Add projectionintro and grass_database pages from doc dir.
* Add compilation for GUI, icons, and additional non-Markdown files.
* Add basic port of graphical index (removes broken links and provides some content).
* Strip keywords from whitespace and skip empty ones

The complex r.mapcalc build would fail on the first run attempt presumably because of a raise condition with color table build. This removes it from standard SUBDIR and relies on the extra pre-builld of r.mapcalc dir. However, this fails to do distclean properly and needs to be addressed later.

g.extension now creates md from html on the fly if no md is present. The build of Markdown and HTML doc creates a race condition while getting the metadata though git clone, so the build now checks for presence of grass-addons clone and uses the directory as a cache after a successful clone. The code assumes all directory move errors are only the good case of a cache being created in the meantime. The code also creates two (or more) clones if multiple processes run together (git clone runs twice, but the clash in the cache is avoided).

---------

Co-authored-by: Anna Petrasova <kratochanna at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list