Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -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 `</body>`
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() }}
<!-- Cloudflare Web Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "13ad1310fd9d46ab969470ec2b361b4e"}'></script><!-- End Cloudflare Web Analytics -->
{%- endblock %}
Loading