{"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1018017637", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1018017637, "node_id": "IC_kwDOBm6k_c48rbdl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-20T23:27:59Z", "updated_at": "2022-01-20T23:27:59Z", "author_association": "OWNER", "body": "Got a couple of TILs out of this:\r\n\r\n- [Promoting the stable version of the documentation using rel=canonical](https://til.simonwillison.net/readthedocs/documentation-seo-canonical)\r\n- [Linking from /latest/ to /stable/ on Read The Docs](https://til.simonwillison.net/readthedocs/link-from-latest-to-stable)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1109808154, "label": "Documentation should clarify /stable/ vs /latest/"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1017998993", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1017998993, "node_id": "IC_kwDOBm6k_c48rW6R", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-20T22:56:00Z", "updated_at": "2022-01-20T22:56:00Z", "author_association": "OWNER", "body": "> https://sphinx-version-warning.readthedocs.io/ looks like it can show a banner for \"You are looking at v0.36 but you should be looking at 0.40\" but doesn't hand the case I need here which is \"you are looking at /latest/ but you should be looking at /stable/\".\r\n\r\nCorrection! That tool DOES support that, as can be seen in their example configuration for their own documentation:\r\n\r\nhttps://github.com/humitos/sphinx-version-warning/blob/a82156c2ea08e5feab406514d0ccd9d48a345f48/docs/conf.py#L32-L38\r\n\r\n```python\r\nversionwarning_messages = {\r\n 'latest': 'This is a custom message only for version \"latest\" of this documentation.',\r\n}\r\nversionwarning_admonition_type = 'tip'\r\nversionwarning_banner_title = 'Tip'\r\nversionwarning_body_selector = 'div[itemprop=\"articleBody\"]'\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1109808154, "label": "Documentation should clarify /stable/ vs /latest/"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1017994925", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1017994925, "node_id": "IC_kwDOBm6k_c48rV6t", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-20T22:48:43Z", "updated_at": "2022-01-20T22:54:02Z", "author_association": "OWNER", "body": "https://sphinx-version-warning.readthedocs.io/ looks like it can show a banner for \"You are looking at v0.36 but you should be looking at 0.40\" but doesn't hand the case I need here which is \"you are looking at /latest/ but you should be looking at /stable/\".\r\n\r\nJust shipped my fix here: https://docs.datasette.io/en/latest/\r\n\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1109808154, "label": "Documentation should clarify /stable/ vs /latest/"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1017993482", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1017993482, "node_id": "IC_kwDOBm6k_c48rVkK", "user": {"value": 316517, "label": "astrojuanlu"}, "created_at": "2022-01-20T22:46:16Z", "updated_at": "2022-01-20T22:46:16Z", "author_association": "NONE", "body": "Or you can use https://sphinx-version-warning.readthedocs.io/! \ud83d\ude04 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1109808154, "label": "Documentation should clarify /stable/ vs /latest/"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1017988556", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1017988556, "node_id": "IC_kwDOBm6k_c48rUXM", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-20T22:37:51Z", "updated_at": "2022-01-20T22:37:51Z", "author_association": "OWNER", "body": "Here's a jQuery recipe that seems to do the right thing:\r\n```javascript\r\njQuery(function ($) {\r\n // If this is a /latest/ doc page, show banner linking to /stable/\r\n if (!/\\/latest\\//.test(location.pathname)) {\r\n return;\r\n }\r\n var stableUrl = location.pathname.replace(\"/latest/\", \"/stable/\");\r\n // Check it's not a 404\r\n fetch(stableUrl, { method: \"HEAD\" }).then((response) => {\r\n if (response.status == 200) {\r\n var warning = $(\r\n `
Note
\r\n\r\n This documentation covers the development version of Datasette.
\r\nSee this page for the current stable release.\r\n
\r\n