diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000..037a78558 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,22 @@ +{%- extends "!layout.html" %} + +{# Cloudflare Web Analytics. + + The published site (https://faust-streaming.github.io/faust) is the Sphinx + HTML tree the Pages workflow builds, so there is no hand-written page to + paste Cloudflare's snippet into -- a template override is what puts it on + every generated page instead. `footer` is the last block before `` + in the basic theme alabaster derives from, which is where the snippet + belongs; `super()` keeps the theme's own footer and GitHub banner. + + This is Cloudflare's documented classic `defer` form rather than a + `type='module'` one. A module script is deferred anyway, so nothing is + lost -- but `document.currentScript` is null while a module executes, and + that is how a beacon reads the `data-cf-beacon` token off its own tag. The + classic form keeps the token readable however the beacon looks it up, and + still runs in browsers that skip module scripts. +#} +{%- block footer %} + {{ super() }} + +{%- endblock %}