Skip to content

Commit

Permalink
Create head.html
Browse files Browse the repository at this point in the history
  • Loading branch information
meghan06 authored Jun 29, 2023
1 parent 6cf7b4a commit 0155c14
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">

<script>
const theme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', theme);
</script>
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">

{% 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">

{% for file in site.static_files %}
{% if file.path == site.favicon_ico or file.path == '/favicon.ico' %}
{% assign favicon = true %}
{% endif %}
{% endfor %}
{% if favicon %}
<link rel="icon" href="{{ site.favicon_ico | default: '/favicon.ico' | relative_url }}" type="image/x-icon">
{% endif %}

{% seo %}

{% include head_custom.html %}

</head>

0 comments on commit 0155c14

Please sign in to comment.