Skip to content

doc: docs tooling and configuration updates#1368

Open
minaelee wants to merge 18 commits intocanonical:mainfrom
minaelee:docs-tooling-updates
Open

doc: docs tooling and configuration updates#1368
minaelee wants to merge 18 commits intocanonical:mainfrom
minaelee:docs-tooling-updates

Conversation

@minaelee
Copy link
Copy Markdown
Contributor

@minaelee minaelee commented May 4, 2026

Updates to MicroCloud docs tooling and configuration for improvements as well as to align with standard Canonical docs tooling (Sphinx Stack 1.6, formerly known as Sphinx Starter Pack), including:

  • Remove build_requirements.py and related code to dynamically build requirements.txt. Static file provided instead.
  • Merge conf_py & custom_conf.py, and Makefile & Makefile.sp, and bring merged versions into alignment with Sphinx Stack. Includes using doc/.venv now instead of doc/.sphinx/venv for virtual environment directory at build time.
  • Use Vale for spelling and woke checks; fix newly flagged issues by Vale.
  • Use the canonical-sphinx extension while preserving MicroCloud customizations; remove use of canonical-sphinx-extensions.
  • Removing canonical-sphinx-extensions required adding back in some extensions previously bundled with it, including sphinx-terminal, which in its un-bundled form has a difference in usage (the :input: option is now handled differently). Update usage of {terminal} directive.
  • To align with Sphinx Stack directory structure, move _templates and _static directories out from doc/.sphinx/ to doc/, and substitutions.yaml from doc/ to doc/reuse.
  • Add SINGLE_BUILD=True to linkcheck make target to prevent GH CI from warning and exiting linkcheck when it tries and fails to find the integration files.
  • Replace sphinx-reredirects extension with sphinx-rerediraffe, the new default URL redirecter.
  • Update configuration paths for MicroCeph.
  • Remove RTD search support (RTD search is already disabled in MicroCloud docs due to inconsistent behavior).
  • Add ubuntu.com to the linkcheck ignore list (despite being up, the site has been failing every linkcheck recently and I suspect this is due to increased protection measures).
  • Add .sphinx/version file to record last version of sphinx-stack this docs set was updated against.

@github-actions github-actions Bot added the Documentation Documentation needs updating label May 4, 2026
@minaelee minaelee force-pushed the docs-tooling-updates branch 7 times, most recently from ba13e3d to dbab7ca Compare May 5, 2026 02:26
@minaelee minaelee marked this pull request as ready for review May 5, 2026 02:32
Comment thread .github/workflows/markdown-style-checks.yml Fixed
@minaelee minaelee marked this pull request as draft May 6, 2026 07:33
Signed-off-by: Minae Lee <minae.lee@canonical.com>
@minaelee minaelee force-pushed the docs-tooling-updates branch from 50ceb07 to 09eeff4 Compare May 6, 2026 15:48
@minaelee minaelee marked this pull request as ready for review May 6, 2026 15:48
@minaelee minaelee force-pushed the docs-tooling-updates branch from c38ed10 to f7a14df Compare May 7, 2026 03:54
@minaelee minaelee closed this May 7, 2026
@minaelee minaelee reopened this May 7, 2026
@minaelee minaelee force-pushed the docs-tooling-updates branch 2 times, most recently from 91dd5e2 to 90f9f10 Compare May 7, 2026 05:04
@minaelee
Copy link
Copy Markdown
Contributor Author

minaelee commented May 7, 2026

Note: RTD build has been failing for the past hour. I tried to debug it but nothing helped, and then I thought to check other projects with recent RTD builds, and it looks like every build within the past hour on RTD has failed. Could be a GitHub issue or RTD issue. Either way, I'll wait to see if it is resolved in the morning.

@roosterfish
Copy link
Copy Markdown
Contributor

Note: RTD build has been failing for the past hour. I tried to debug it but nothing helped, and then I thought to check other projects with recent RTD builds, and it looks like every build within the past hour on RTD has failed. Could be a GitHub issue or RTD issue. Either way, I'll wait to see if it is resolved in the morning.

Also the link checks are quite unstable over the last days, lots of timeouts. Likely related to the recent issues?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates MicroCloud’s documentation toolchain and Sphinx configuration to align with Canonical’s Sphinx Stack (1.6) and associated conventions, including changes to redirects, linting (Vale/woke), requirements management, and template/static layout.

Changes:

  • Replace dynamic/docs-starter-pack requirements generation with a static doc/requirements.txt, and migrate config into a single doc/conf.py.
  • Adopt Vale-based style/spelling checks and update doc examples to match sphinx-terminal directive behavior changes.
  • Switch redirects from redirects.py/sphinx-reredirects style to redirects.txt + sphinx-rerediraffe, and move templates/static assets to Sphinx Stack layout.

Reviewed changes

Copilot reviewed 44 out of 50 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
doc/tutorial/single-member.md Updates {terminal} directive usage (input/output-only formatting).
doc/tutorial/multi-member.md Updates {terminal} directive usage (input/output-only formatting).
doc/reuse/substitutions.yaml Adds centralized substitutions YAML (tracks current LTS/feature).
doc/requirements.txt Introduces static Python requirements for docs tooling/extensions.
doc/reference/release-notes/release-notes-template.md Clarifies template instructions for release note authors.
doc/redirects.txt Adds redirects mapping file for sphinx-rerediraffe.
doc/redirects.py Removes old Python redirects mapping.
doc/Makefile.sp Removes starter-pack Makefile wrapper.
doc/Makefile Replaces build/install/check targets to match Sphinx Stack conventions.
doc/how-to/update_upgrade.md Updates {terminal} directive usage.
doc/how-to/snaps.md Updates {terminal} directive usage.
doc/how-to/ovn_underlay.md Updates {terminal} directive usage.
doc/how-to/member_remove.md Improves terminology clarity (“monmap” → “monitor map”).
doc/how-to/ceph_networking.md Updates {terminal} directive usage and formatting.
doc/explanation/security.md Adds spelling exception markup for “man-in-the-middle”.
doc/explanation/initialization.md Updates {terminal} directive usage; splits combined blocks.
doc/doc-cheat-sheet-myst.md Updates terminal directive guidance and links to sphinx-terminal README.
doc/custom_conf.py Removes legacy split config file (merged into conf.py).
doc/conf.py Consolidates/updates Sphinx configuration for canonical-sphinx + Sphinx Stack.
doc/.wordlist.txt Removes starter-pack wordlist file (moves to Vale approach).
doc/.sphinx/version Records the Sphinx Stack version the docs were aligned to.
doc/.sphinx/spellingcheck.yaml Removes pyspelling configuration (replaced by Vale).
doc/.sphinx/get_vale_conf.py Reworks Vale config download script (clone + copy style guide assets).
doc/.sphinx/build_requirements.py Removes dynamic requirements generator.
doc/.sphinx/_templates/sidebar/search.html Removes legacy sidebar search template override (RTD search removed).
doc/.sphinx/_templates/page.html Removes legacy page template override (moved to new templates layout).
doc/.sphinx/_templates/header.html Removes legacy header template (moved to doc/_templates).
doc/.sphinx/_templates/404.html Removes legacy 404 template (handled differently in new layout).
doc/.sphinx/_static/header.css Removes legacy header styling (replaced by new static layout/CSS).
doc/.sphinx/_static/header-nav.js Removes legacy header dropdown script.
doc/.sphinx/_static/github_issue_links.js Removes legacy “Give feedback” JS injection.
doc/.sphinx/_static/github_issue_links.css Removes legacy styling for feedback link.
doc/.sphinx/_static/furo_colors.css Removes legacy Furo color overrides.
doc/.sphinx/_static/footer.js Removes legacy footer contributors dropdown script.
doc/.sphinx/_static/footer.css Removes legacy footer contributors styling.
doc/.sphinx/_static/custom.css Removes legacy custom CSS bundle from old layout.
doc/.sphinx/_static/404.svg Removes legacy 404 asset from old layout.
doc/.sphinx/_integration/rtd-search.js Removes RTD search integration script.
doc/.sphinx/_integration/add_config.py Updates integrated-build config injection (URLs/paths/tags).
doc/.readthedocs.yaml Updates RTD build commands and requirements path.
doc/.gitignore Updates ignores for new .venv and removed generated files.
doc/.custom_wordlist.txt Adds “subfolders” to custom word list.
doc/_templates/header.html Adds new header template in Sphinx Stack location with accessibility attributes.
doc/_templates/google-tag.html Adds Google Tag Manager include template.
doc/_templates/footer.html Updates footer template and adds license rendering section.
doc/_templates/base.html Adds base template override for JS globals and theme style suppression.
doc/_static/microcloud_tag.png Adds MicroCloud tag image asset.
doc/_static/favicon.png Adds favicon asset.
.github/workflows/tests.yml Sets docs job Python version to 3.12.
Comments suppressed due to low confidence (2)

doc/_templates/footer.html:47

  • copyright in doc/conf.py already includes the author value, but the footer prints {{ copyright }} {{ author }}. This will duplicate the author text in the rendered footer. Either remove {{ author }} here or change the copyright string to exclude the author so it’s only rendered once.
    doc/_templates/footer.html:51
  • Same duplication issue as above in the non-hasdoc('copyright') branch: {{ copyright }} {{ author }} will repeat the author because copyright already embeds it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/Makefile
Comment on lines +69 to +74
pa11y-install:
@command -v $(PA11Y_CMD) >/dev/null || { \
echo "Installing \"pa11y\" from npm..."; echo; \
mkdir -p $(SPHINX_DIR)/node_modules/ ; \
npm install --prefix $(SPHINX_DIR) pa11y; \
}
Comment thread doc/requirements.txt
Comment thread doc/conf.py Outdated
Comment thread doc/conf.py Outdated
Comment thread doc/redirects.txt Outdated
Comment thread doc/conf.py Outdated
Comment thread doc/conf.py
Copy link
Copy Markdown
Contributor

@roosterfish roosterfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, I cannot say much about the doc tooling changes, but I have commented on a few items that caught my eye.

@elijahgreenstein could you please also have a look?

The last commit is causing a failure of the DCO test. I have just earlier merged your PR on link updates, you can now also rebase, maybe this helps.

with:
working-directory: './doc'
makefile: 'Makefile'
python-version: '3.12'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use 3.14? According to https://devguide.python.org/versions/ it seems to be latest stable one.

Comment thread doc/requirements.txt
Comment thread doc/conf.py
Comment thread doc/conf.py
@@ -1,29 +1,170 @@
#! /usr/bin/env python
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious if this is a file that can be imported from somewhere else if there is a central place for it?
It doesn't look MicroCloud specific so I am wondering if this is feasible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a lightly refactored version from the Sphinx Stack, and identical to what LXD uses. In the future, it might be better to drop the refactoring (or suggest it in the Sphinx Stack) so that LXD and MicroCloud can both use the same version as the upstream.

Comment thread doc/.sphinx/version Outdated
minaelee added 4 commits May 7, 2026 09:56
Moves code from custom_conf.py into conf.py and aligns it with the
Sphinx Stack (formerly the Sphinx Starter Pack). This deliberately
excludes the code for the Swagger UI, which will be added into conf.py
in a separate commit to make this change easier to backport to the
v2-edge branch, which does not use Swagger UI.

Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Merge Makefile.sp into Makefile and update Makefile to better align with
the Sphinx Stack (formerly the Sphinx Starter Pack).

Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
minaelee added 13 commits May 7, 2026 09:58
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Replaces use of the canonical-sphinx-extensions extension with the canonical-sphinx
extension, adapted for MicroCloud customizations. The canonical-sphinx-extensions
package included multiple extensions that have now been split out into their own
extensions and updated, including sphinx-terminal, and these have been re-added as needed.

Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Set SINGLE_BUILD=True when running linkcheck to avoid issues in CI where
only MicroCloud is built and linkcheck looks for the integrated docs.

Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
Signed-off-by: Minae Lee <minae.lee@canonical.com>
This commit removes the RTD search support, which is already disabled in the
RTD project settings due to inconsistent behavior in the MicroCloud docs.

Signed-off-by: Minae Lee <minae.lee@canonical.com>
Adds a file to record the last version of sphinx-stack the docs tooling
was updated against.

Signed-off-by: Minae Lee <minae.lee@canonical.com>
@minaelee minaelee force-pushed the docs-tooling-updates branch from 90f9f10 to c45675a Compare May 7, 2026 17:06
@minaelee
Copy link
Copy Markdown
Contributor Author

minaelee commented May 7, 2026

Note: RTD build has been failing for the past hour. I tried to debug it but nothing helped, and then I thought to check other projects with recent RTD builds, and it looks like every build within the past hour on RTD has failed. Could be a GitHub issue or RTD issue. Either way, I'll wait to see if it is resolved in the morning.

Also the link checks are quite unstable over the last days, lots of timeouts. Likely related to the recent issues?

Looks like the issues are resolved and the RTD build is working now. I'll drop that last commit that was failing the DCO check (it was just a test commit to try to refresh the RTD cache).

Re: linkchecks, at first it was due to the recent issues, but now I suspect that ubuntu.com has stiffer protections against non-browser requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants