mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-04 03:01:23 -06:00
PR for the issue flagged in https://github.com/just-the-docs/just-the-docs/discussions/1359#discussioncomment-7267686 (and related to #1358, #1350, etc.). This PR essentially just disables the `head-nav` stylesheet by ID instead of relying on the index; this makes the code more robust against stylesheets that are arbitrarily entered into the document (such as by JavaScript, which is the case of #1359).
54 lines
1.7 KiB
HTML
54 lines
1.7 KiB
HTML
{%- comment -%}
|
|
Include as: {%- include head.html -%}
|
|
Depends on: site.ga_tracking, site.ga_tracking_anonymize_ip,
|
|
site.search_enabled, site.static_files, site.favicon_ico.
|
|
Results in: HTML for the head element.
|
|
Includes:
|
|
css/activation.scss.liquid, head_custom.html.
|
|
Overwrites:
|
|
ga_tracking_ids, ga_property, file, favicon.
|
|
Should not be cached, because included files depend on page.
|
|
{%- endcomment -%}
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
|
|
|
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
|
|
|
|
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-head-nav.css' | relative_url }}" id="jtd-head-nav-stylesheet">
|
|
|
|
<style id="jtd-nav-activation">
|
|
{% include css/activation.scss.liquid %}
|
|
</style>
|
|
|
|
{% if site.ga_tracking != nil %}
|
|
{% assign ga_tracking_ids = site.ga_tracking | split: "," %}
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_tracking_ids.first }}"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
{% for ga_property in ga_tracking_ids %}
|
|
gtag('config', '{{ ga_property }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
|
|
{% endfor %}
|
|
</script>
|
|
{% endif %}
|
|
|
|
{% if site.search_enabled != false %}
|
|
<script src="{{ '/assets/js/vendor/lunr.min.js' | relative_url }}"></script>
|
|
{% endif %}
|
|
|
|
<script src="{{ '/assets/js/just-the-docs.js' | relative_url }}"></script>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
{% include_cached favicon.html %}
|
|
|
|
{% seo %}
|
|
|
|
{% include head_custom.html %}
|
|
|
|
</head>
|