Skip to content
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

Create and link sitemaps for the combined MkDoc doc and Sphinx doc #5321

Open
6 of 8 tasks
wenzeslaus opened this issue Mar 6, 2025 · 0 comments
Open
6 of 8 tasks
Assignees
Labels
CI Continuous integration docs
Milestone

Comments

@wenzeslaus
Copy link
Member

wenzeslaus commented Mar 6, 2025

Create sitemap for the MkDoc doc and the Sphinx part of the doc whole combined doc in CI (Documentation workflow) and prepare sitemap for the main website which reflects new names or file placement if needed.

  • current sitemap structure fully mapped
  • sitemap generated for main doc
  • sitemap generated for addons doc (as one file with the main doc)
  • sitemap generated for Python (Sphinx) doc
  • sitemap for core doc and linked from main sitemap
  • sitemap for addons and linked from main/parent sitemap
  • sitemap for libpython and linked from main/parent sitemap
  • main sitemap at grass.osgeo.org prepared for a new site map structure

Notes:

  • MkDocs generates sitemap.xml (and sitemap.xml.gz) which contains both the main dir and addons subdir with https://grass.osgeo.org/grass-stable/manuals/ URLs and lastmod date.
  • Sphinx has an extension sphinx-sitemap.

The sitemaps are currently created on the server by a custom script:

############################################
# create sitemaps to expand the hugo sitemap

# versioned manual:
python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass$GMAJOR$GMINOR/manuals/ --url=https://grass.osgeo.org/grass$GMAJOR$GMINOR/manuals/ -o
python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass$GMAJOR$GMINOR/manuals/addons/ --url=https://grass.osgeo.org/grass$GMAJOR$GMINOR/manuals/addons/ -o

# grass-devel manual:
python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass-devel/manuals/ --url=https://grass.osgeo.org/grass-devel/manuals/ -o
python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var/www/code_and_data/grass-devel/manuals/addons/ --url=https://grass.osgeo.org/grass-devel/manuals/addons/ -o
@wenzeslaus wenzeslaus added this to the 8.5.0 milestone Mar 6, 2025
@wenzeslaus wenzeslaus added CI Continuous integration docs labels Mar 6, 2025
@cwhite911 cwhite911 self-assigned this Mar 6, 2025
@cwhite911 cwhite911 moved this from Todo to In Progress in GRASS Markdown Documentation Mar 7, 2025
wenzeslaus pushed a commit that referenced this issue Mar 21, 2025
Added sitemap for Sphinx docs using the sphinx-sitemap extension to address part of issue #5321. Includes the corresponding change in CI.

The results are a basic sitemap with each URL. Leaving out pages according to the example in documentation. Not including lastmod which is in our current site maps because this is not currently supported by Sphinx (but in it is  works).
wenzeslaus pushed a commit that referenced this issue Mar 27, 2025
)

Adds a new script (utils/merge_sitemaps.py) to run during the documentation.yml GitHub Action workflow which merges MkDocs sitemap (now only one comparing to the custom doc which has a separate one for addons) and Sphinx sitemap.

See also #5321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration docs
Projects
Status: In Progress
Development

No branches or pull requests

2 participants