Skip to content

Commit 4155572

Browse files
committed
Add additional assets to header area
This also fixes the custom template to use "extrahead". According to the official doc, this seems to be the correct class to inherit. https://www.sphinx-doc.org/en/master/templating.html#working-with-the-builtin-templates Signed-off-by: Fujimoto Seiji <fujimoto@ceptord.net>
1 parent ecd795b commit 4155572

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

source/_templates/layout.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "!layout.html" %}
22

3-
{% block header %}
3+
{% block extrahead %}
44
{{ super() }}
55
<!-- Global site tag (gtag.js) - Google Analytics -->
66
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7EP88Q2KZ1"></script>
@@ -11,4 +11,19 @@
1111

1212
gtag('config', 'G-7EP88Q2KZ1');
1313
</script>
14+
<!-- Google Tag Manager -->
15+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
16+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
17+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
18+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
19+
})(window,document,'script','dataLayer','GTM-NXD8Q6J');</script>
20+
<!-- End Google Tag Manager -->
21+
{% endblock %}
22+
23+
{% block content %}
24+
<!-- Google Tag Manager (noscript) -->
25+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NXD8Q6J"
26+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
27+
<!-- End Google Tag Manager (noscript) -->
28+
{{ super() }}
1429
{% endblock %}

0 commit comments

Comments
 (0)