Skip to content

Feat: redirect to RTD if local docs missing#2006

Merged
Flix6x merged 4 commits intomainfrom
fix/reference-rtd-if-local-docs-missing
Mar 6, 2026
Merged

Feat: redirect to RTD if local docs missing#2006
Flix6x merged 4 commits intomainfrom
fix/reference-rtd-if-local-docs-missing

Conversation

@Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Mar 6, 2026

Description

  • If local docs are cross-referenced (e.g. in Swagger) and they haven't been built locally, then the server redirect to readthedocs.org
  • Added changelog item in documentation/changelog.rst

Look & Feel

For instance, on http://localhost:5000/api/v3_0/docs/#/Assets/post_api_v3_0_assets__id__schedules_trigger under the flex-context:

image

Redirects to https://flexmeasures.readthedocs.io/stable/search.html?q=commitments

How to test

  • Visit localhost:5000/ui/static/documentation/html/search.html?q=commitments

Further Improvements

None

Related Items

Follow-up from #2002.

Flix6x added 3 commits March 6, 2026 11:54
…ocs in case local docs are missing (not built)

Signed-off-by: F.N. Claessen <claessen@seita.nl>
…stable docs in case local docs are missing (not built)"

This reverts commit 52565a3.
Signed-off-by: F.N. Claessen <claessen@seita.nl>
@Flix6x Flix6x added this to the 0.31.1 milestone Mar 6, 2026
@Flix6x Flix6x self-assigned this Mar 6, 2026
@Flix6x Flix6x added documentation Improvements or additions to documentation UI labels Mar 6, 2026
Signed-off-by: F.N. Claessen <claessen@seita.nl>
@Flix6x Flix6x requested a review from nhoening March 6, 2026 11:32
@read-the-docs-community
Copy link

Documentation build overview

📚 flexmeasures | 🛠️ Build #31691946 | 📁 Comparing f9fe8b3 against latest (07e42d3)


🔍 Preview build

Show files changed (3 files in total): 📝 3 modified | ➕ 0 added | ➖ 0 deleted
File Status
changelog.html 📝 modified
_autosummary/flexmeasures.ui.error_handlers.html 📝 modified
api/v3_0.html 📝 modified

Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Works well locally. I assume also live.

@Flix6x Flix6x merged commit b6d44d0 into main Mar 6, 2026
7 checks passed
@Flix6x Flix6x deleted the fix/reference-rtd-if-local-docs-missing branch March 6, 2026 11:55
Flix6x added a commit that referenced this pull request Mar 6, 2026
* feat: still link Swagger to Sphinx, but use the external RTD stable docs in case local docs are missing (not built)

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Revert "feat: still link Swagger to Sphinx, but use the external RTD stable docs in case local docs are missing (not built)"

This reverts commit 52565a3.

* feat: redirect to RTD in case of missing local docs (not built)

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <claessen@seita.nl>

---------

Signed-off-by: F.N. Claessen <claessen@seita.nl>
(cherry picked from commit b6d44d0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants