{"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/sqlite-utils/issues/388#issuecomment-1484269326", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/388", "id": 1484269326, "node_id": "IC_kwDOCGYnMM5YeCcO", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:24:12Z", "updated_at": "2023-03-26T23:28:14Z", "author_association": "OWNER", "body": "This broke on the upgrade to Furo.\r\n\r\nI fixed it in Datasette like this: https://github.com/simonw/datasette/commit/5c1cfa451d78e3935193f5e10eba59bf741241a1 and https://github.com/simonw/datasette/commit/db8cf899e286fbaa0a40f3a9ae8d5aaa1478822e", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114543475, "label": "Link to stable docs from older versions"}, "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-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\"image\"\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-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> `
\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>
`\r\n> );\r\n> warning.find(\"a\").attr(\"href\", stableUrl);\r\n> $(\"article[role=main]\").prepend(warning);\r\n> }\r\n> });\r\n> });\r\n> \r\n> Rewrite this to use vanilla JavaScript, no jQuery\r\n> ```\r\n\r\nGot back:\r\n\r\n```javascript\r\ndocument.addEventListener(\"DOMContentLoaded\", 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 = document.createElement(\"div\");\r\n warning.className = \"admonition warning\";\r\n warning.innerHTML = `\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/sqlite-utils/issues/388#issuecomment-1484276302", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/388", "id": 1484276302, "node_id": "IC_kwDOCGYnMM5YeEJO", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:39:27Z", "updated_at": "2023-03-26T23:39:27Z", "author_association": "OWNER", "body": "Actually final Datasette fix was:\r\n```html+jinja\r\n{% block scripts %}\r\n{{ super() }}\r\n\r\n{% endblock %}\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114543475, "label": "Link to stable docs from older versions"}, "performed_via_github_app": null} {"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/sqlite-utils/issues/388#issuecomment-1484277416", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/388", "id": 1484277416, "node_id": "IC_kwDOCGYnMM5YeEao", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-26T23:43:12Z", "updated_at": "2023-03-26T23:43:12Z", "author_association": "OWNER", "body": "Fixed: https://sqlite-utils.datasette.io/en/latest/reference.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1114543475, "label": "Link to stable docs from older versions"}, "performed_via_github_app": null}