Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit f803fec

Browse files
authored
Disable tracking for Netlify previews and remove useless include (#1129)
Also fix some markup issues reported by HTML validator
1 parent fb207e1 commit f803fec

File tree

5 files changed

+37
-36
lines changed

5 files changed

+37
-36
lines changed

_includes/head.html

+22-24
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@
44
<link rel="canonical" href="{{ page.canonical | absolute_url }}">
55
{%- assign navvar = page.dir | navvar %}
66
<title>{% if page.title %}{{ page.title }}{% else %}{% navtitle navvar %}{% endif %} | ArangoDB Documentation</title>
7-
<meta itemprop="description" name="description" content="{% if page.description %}{{ page.description | truncate: 160 }}{% else %}{{ site.description | truncate: 160 }}{% endif %}" />
8-
<meta name="robots" content="{% if page.version.tag == "devel" or site.data.deprecations contains page.version.version %}noindex, nofollow{% else %}index, follow{% endif %}" />
9-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10-
<meta property="og:url" content="{{ page.canonical | absolute_url }}" />
11-
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{% navtitle navvar %}{% endif %} | ArangoDB Documentation" />
12-
<meta property="og:type" content="website" />
13-
<meta property="og:description" content="{% if page.description %}{{ page.description | truncate: 200 }}{% else %}{{ site.description | truncate: 200 }}{% endif %}" />
7+
<meta itemprop="description" name="description" content="{% if page.description %}{{ page.description | truncate: 160 | xml_escape }}{% else %}{{ site.description | truncate: 160 | xml_escape }}{% endif %}">
8+
<meta name="robots" content="{% if page.version.tag == "devel" or site.data.deprecations contains page.version.version %}noindex, nofollow{% else %}index, follow{% endif %}">
9+
<meta property="og:url" content="{{ page.canonical | absolute_url }}">
10+
<meta property="og:title" content="{% if page.title %}{{ page.title | xml_escape }}{% else %}{% navtitle navvar %}{% endif %} | ArangoDB Documentation">
11+
<meta property="og:type" content="website">
12+
<meta property="og:description" content="{% if page.description %}{{ page.description | truncate: 200 | xml_escape }}{% else %}{{ site.description | truncate: 200 | xml_escape }}{% endif %}">
1413

14+
<link rel="shortcut icon" href="https://www.arangodb.com/wp-content/uploads/2018/07/www.arangodb.com-favicon.png">
15+
<link rel="stylesheet" href="{{ "/styles/gitbook/style.css" | relative_url }}">
16+
<link rel="stylesheet" href="{{ "/styles/gitbook/highlight-website.css" | relative_url }}">
17+
<link rel="stylesheet" href="{{ "/styles/gitbook/fontsettings-website.css" | relative_url }}">
18+
<link rel="stylesheet" href="{{ "/styles/website.css" | relative_url }}">
19+
<link rel="stylesheet" href="{{ "/styles/header.css" | relative_url }}">
20+
<link rel="stylesheet" href="{{ "/styles/navbar.css" | relative_url }}">
21+
<link rel="stylesheet" href="{{ "/styles/site.css" | relative_url }}">
22+
<link rel="stylesheet" href="{{ "/styles/pygments-arango.css" | relative_url }}">
23+
<script src="{{ "/js/jquery-3.4.0.min.js" | relative_url }}"></script>
24+
<script src="{{ "/js/site.js" | relative_url }}"></script>
25+
26+
{%- if jekyll.environment != 'netlify' -%}
1527
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-81053435-1"></script>
1628
<script>
1729
window.dataLayer = window.dataLayer || [];
@@ -58,11 +70,11 @@
5870
twq('track','PageView');
5971
</script>
6072

61-
<script type="text/javascript">
73+
<script>
6274
_linkedin_partner_id = "499017";
6375
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
6476
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
65-
</script><script type="text/javascript">
77+
</script><script>
6678
(function(){var s = document.getElementsByTagName("script")[0];
6779
var b = document.createElement("script");
6880
b.type = "text/javascript";b.async = true;
@@ -81,18 +93,4 @@
8193
s.parentNode.insertBefore(zi, s);
8294
})();
8395
</script>
84-
85-
<link rel="shortcut icon" href="https://www.arangodb.com/wp-content/uploads/2018/07/www.arangodb.com-favicon.png">
86-
<link rel="stylesheet" href="{{ "/styles/gitbook/style.css" | relative_url }}">
87-
<link rel="stylesheet" href="{{ "/styles/gitbook/highlight-website.css" | relative_url }}">
88-
<link rel="stylesheet" href="{{ "/styles/gitbook/fontsettings-website.css" | relative_url }}">
89-
<link rel="stylesheet" href="{{ "/styles/website.css" | relative_url }}">
90-
<link rel="stylesheet" href="{{ "/styles/header.css" | relative_url }}">
91-
<link rel="stylesheet" href="{{ "/styles/navbar.css" | relative_url }}">
92-
<link rel="stylesheet" href="{{ "/styles/site.css" | relative_url }}">
93-
<link rel="stylesheet" href="{{ "/styles/pygments-arango.css" | relative_url }}">
94-
<script src="{{ "/js/jquery-3.4.0.min.js" | relative_url }}"></script>
95-
<script src="{{ "/js/site.js" | relative_url }}"></script>
96-
{%- if jekyll.environment == 'production' and site.google_analytics -%}
97-
{%- include google-analytics.html -%}
98-
{%- endif %}
96+
{%- endif %}

_includes/sidebar.html

-3
This file was deleted.

_includes/topnav.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
{%- if jekyll.environment != 'netlify' -%}
12
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5LQ7HC" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
2-
<noscript><img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=499017&fmt=gif" /></noscript>
3+
<noscript><img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=499017&fmt=gif"></noscript>
4+
{% endif -%}
35

46
<div class="arangodb-header">
57
<div class="arangodb-logo">
@@ -23,7 +25,7 @@
2325
<option value="{{ version_alias }}"{% unless v.url %} disabled{% endunless %}>{{ version_number }}</option>
2426
{%- endfor %}
2527
</select>
26-
<script type="text/javascript">
28+
<script>
2729
var versionAliases = {{ site.versions | jsonify }};
2830
var current = location.href;
2931

_layouts/default.html

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
{%- include head.html %}
4+
{% include head.html %}
55
</head>
66
<body>
77
{% include topnav.html %}
88
<div class="book with-summary font-size-2 font-family-1">
99
<div class="book-summary">
10-
{% include sidebar.html %}
10+
<nav>
11+
{% navigation navvar %}
12+
</nav>
1113
</div>
1214
<div class="book-body">
13-
<script type="text/javascript">
15+
<script>
1416
var availableVersions = [
1517
{%- for v in page.versions -%}
1618
{%- if v.version.tag and jekyll.environment != "netlify" -%}
@@ -58,7 +60,7 @@
5860
</div>
5961
</div>
6062
</div>
61-
<script type="text/javascript">
63+
<script>
6264
var disablePageToc = {{ page["page-toc"].disable | jsonify }};
6365
if (!disablePageToc) {
6466
generateToc({{ page["page-toc"]["max-headline-level"] }});
@@ -68,7 +70,9 @@
6870
</div>
6971
</div>
7072
{% include algolia.html %}
71-
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/2482448.js"></script>
72-
<noscript><img src="https://ws.zoominfo.com/pixel/60e5aeed1cb467001537be54" width="1" height="1" style="display: none;" /></noscript>
73+
{%- if jekyll.environment != 'netlify' -%}
74+
<script id="hs-script-loader" async defer src="//js.hs-scripts.com/2482448.js"></script>
75+
<noscript><img src="https://ws.zoominfo.com/pixel/60e5aeed1cb467001537be54" width="1" height="1" style="display: none;" alt=""></noscript>
76+
{%- endif %}
7377
</body>
7478
</html>

_plugins/NavigationTag.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def renderTree(context, root, stack)
2222
if element['subtitle']
2323
output += localIndent + "<li class=\"header\">" + element['subtitle'] + "</li>\n"
2424
elsif element['divider']
25-
output += localIndent + "<li><hr/></li>\n"
25+
output += localIndent + "<li><hr></li>\n"
2626
else
2727
children = ""
2828
classNames = "chapter"

0 commit comments

Comments
 (0)