Skip to content

Prepare theme for migration to docs.cratedb.com - #762

Open
msbt wants to merge 9 commits into
crate:mainfrom
msbt:msbt/docs-migration
Open

msbt wants to merge 9 commits into
crate:mainfrom
msbt:msbt/docs-migration

Conversation

@msbt

@msbt msbt commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary of the changes / Why this is an improvement

Adjusted html_baseurl of all projects, changed relative to absolute links/paths and vice versa, removed ESI & crate-docs intersphinx dependencies for a smooth transition. Full list is in CHANGES.rst

What to do with it

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8b5a7a39-2932-4daa-9be1-b238fe213583

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Cross-project links move from /docs/<project>/ to /projects/<alias>/, the
path Read the Docs serves subprojects at.

They stay root-relative so they resolve against whichever domain serves
the page. That keeps navigation working on both docs.cratedb.com and the
readthedocs.io domain, where these links are currently broken.

The Support link becomes absolute: it points at the regular site, which
will no longer be the origin serving these pages.
The header pulled the cratedb.com navigation in through Fastly's Edge Side
Includes, with a hardcoded copy of the menu as the fallback. Read the Docs
serves the pages directly, so there is no ESI processor and both are
removed. Only the Login and Get Started buttons remain.

The logo and the footer legal links were root-relative and resolved only
because the pages were served from cratedb.com. On docs.cratedb.com they
would point into the documentation, so they are now absolute.
Search on SQL 99 never worked. The snippet loading the search index sat
outside any Jinja block, and a template that extends another discards
anything outside a block, so it was silently dropped. The page loaded
neither searchtools.js nor a results container, and searchindex.js was
built on every run but never read.

Now loads Sphinx's search machinery and renders into #search-results.
Also drops the dead server-side results markup, which referenced an
undefined `item` variable, and stops pulling Algolia's scripts into the
one project that does not use them.
…ring migration

The entry pointed at crate-docs.readthedocs.io/en/latest/, which stops
resolving when that project switches to a single-version URL scheme.
Sphinx fetches every inventory at build time and every project builds
with warnings as errors, so one dead inventory would fail all of them.

Nothing referenced the target, and it is a placeholder project. Both the
mapping and the matching :ref: in projects.rst can come back once the
root project has real content.
Point every project at docs.cratedb.com/projects/<alias>

Slugs are flat because a Read the Docs subproject alias is a single path
segment: crate/reference becomes crate-reference, cloud/cli becomes
cloud-cli. They now match the intersphinx_mapping keys.

html_baseurl stays fixed rather than derived from the serving domain, so
every copy declares the same canonical URL wherever it is served and the
documentation is only indexed at docs.cratedb.com.

theme.py keeps its own base URL, since the theme's documentation is
served from its own Read the Docs domain rather than as a subproject.

sql-99 becomes a temporary subproject of crate-docs.

crate-docs received its missing config.
Both rewrote Read the Docs' root-relative /_/ paths to sit under the
proxied path, so injected assets and API calls resolved through Fastly.

They have been dead for a while, RTD replaced it with Addons, injected
server-side, which never consults the Sphinx build. Nothing in the theme
reads either variable.

The migration removes the premise anyway: on docs.cratedb.com, /_/ is
Read the Docs' own origin, which would make this redundant.
ogp_site_url is the fallback for the OpenGraph URL when a page has no
canonical of its own, so it follows the documentation to its new host.
The TODO records why intersphinx_mapping still points at cratedb.com/docs:
Sphinx fetches every inventory at build time and every project builds with
warnings as errors, so pointing them at a host that does not resolve yet
would fail every build. The new URLs are listed above the mapping, ready
to flip once docs.cratedb.com serves content.
With the menu gone, Login and Get Started could use a bit more space inbetween.
@msbt
msbt force-pushed the msbt/docs-migration branch from cf03085 to 79e4520 Compare September 30, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant