{"html_url": "https://github.com/simonw/datasette/issues/1608#issuecomment-1484276946", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1484276946, "node_id": "IC_kwDOBm6k_c5YeETS", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:41:11Z", "updated_at": "2023-03-26T23:41:11Z", "author_association": "OWNER", "body": "It's working again now: https://docs.datasette.io/en/latest/sql_queries.html", "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-1484274796", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1484274796, "node_id": "IC_kwDOBm6k_c5YeDxs", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:38:18Z", "updated_at": "2023-03-26T23:38:18Z", "author_association": "OWNER", "body": "ChatGPT prompt:\r\n\r\n> ```\r\n> jQuery(function ($) {\r\n> // Show banner linking to /stable/ if this is a /latest/ page\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\n>See this page for the current stable release.\r\n>
\r\n>Note
\r\n\r\n This documentation covers the development version of Datasette.\r\n
\r\n\r\n See this page for the current stable release.\r\n
\r\n `;\r\n var mainArticle = document.querySelector(\"article[role=main]\");\r\n mainArticle.insertBefore(warning, mainArticle.firstChild);\r\n }\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-1484272313", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1484272313, "node_id": "IC_kwDOBm6k_c5YeDK5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:36:17Z", "updated_at": "2023-03-26T23:36:17Z", "author_association": "OWNER", "body": "Still getting this error:\r\n\r\n\r\n\r\nWeird because `jQuery` is present in the devtools console.", "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-1484270067", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1484270067, "node_id": "IC_kwDOBm6k_c5YeCnz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:26:10Z", "updated_at": "2023-03-26T23:27:42Z", "author_association": "OWNER", "body": "That didn't work, because `jQuery` isn't yet defined that high up the template.\r\n\r\nI should use `{% block scripts %}` instead: https://github.com/pradyunsg/furo/blob/05350110cf02d033ebb57147eb54e9371a63545a/src/furo/theme/furo/base.html#L89-L102", "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-1484268146", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1608", "id": 1484268146, "node_id": "IC_kwDOBm6k_c5YeCJy", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:23:22Z", "updated_at": "2023-03-26T23:23:22Z", "author_association": "OWNER", "body": "This broke when I upgraded to the Furo theme.", "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-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