mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-16 21:44:10 +02:00
Merge branch 'main' of github.com:simonw/sqlite-utils into spatialite-paths-update
This commit is contained in:
commit
afdf618771
2 changed files with 33 additions and 2 deletions
33
docs/_templates/base.html
vendored
33
docs/_templates/base.html
vendored
|
|
@ -3,4 +3,35 @@
|
||||||
{% block site_meta %}
|
{% block site_meta %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script defer data-domain="sqlite-utils.datasette.io" src="https://plausible.io/js/plausible.js"></script>
|
<script defer data-domain="sqlite-utils.datasette.io" src="https://plausible.io/js/plausible.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
// Show banner linking to /stable/ if this is a /latest/ page
|
||||||
|
if (!/\/latest\//.test(location.pathname)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var stableUrl = location.pathname.replace("/latest/", "/stable/");
|
||||||
|
// Check it's not a 404
|
||||||
|
fetch(stableUrl, { method: "HEAD" }).then((response) => {
|
||||||
|
if (response.status === 200) {
|
||||||
|
var warning = document.createElement("div");
|
||||||
|
warning.className = "admonition warning";
|
||||||
|
warning.innerHTML = `
|
||||||
|
<p class="first admonition-title">Note</p>
|
||||||
|
<p class="last">
|
||||||
|
This documentation covers the <strong>development version</strong> of Datasette.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
See <a href="${stableUrl}">this page</a> for the current stable release.
|
||||||
|
</p>
|
||||||
|
`;
|
||||||
|
var mainArticle = document.querySelector("article[role=main]");
|
||||||
|
mainArticle.insertBefore(warning, mainArticle.firstChild);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ autodoc_member_order = "bysource"
|
||||||
autodoc_typehints = "description"
|
autodoc_typehints = "description"
|
||||||
|
|
||||||
extlinks = {
|
extlinks = {
|
||||||
"issue": ("https://github.com/simonw/sqlite-utils/issues/%s", "#"),
|
"issue": ("https://github.com/simonw/sqlite-utils/issues/%s", "#%s"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue