crate / crate-docs-theme

A Sphinx theme for the CrateDB documentation.
https://crate-docs-theme.readthedocs.io/
Apache License 2.0
20 stars 5 forks source link

SQL-99 RTD URL errors #462

Closed msbt closed 9 months ago

msbt commented 9 months ago

Super low priority, because this affects only assets from readthedocs, but I prefer to not have errors in the browser console ;) Since we changed the URL to be external, we also need to update html_baseurl, canonical_url_path and url_path of the project

https://github.com/crate/crate-docs-theme/blob/main/src/crate/theme/rtd/conf/sql_99.py#L31-L41 for reference. Do you reckon it's enough if we set the following:

from url_path = "docs/sql-99"to url_path = ""

from html_baseurl = "https://cratedb.com/%s/" % url_path to html_baseurl = "https://sql-99.readthedocs.io" % url_path or even omit the % url_path altogether for this and the next?

from "canonical_url_path": "%s/en/latest/" % url_path, to "canonical_url_path": "/en/latest/" % url_path,

If you could confirm that this is how it's supposed to be, I'm happy to create a PR.

amotl commented 9 months ago

Hi Matthias. Your proposal looks good, but I can't tell if it will work. The intertwingulation on this level is of such a shape that I am exclusively approaching corresponding changes on a trial-and-error basis.

Feel free to create a PR to just probe if it works. When it doesn't, we'll improve or revert.

msbt commented 9 months ago

Hah good point, https://github.com/crate/crate-docs-theme/pull/464 for reference