Skip to content

Commit

Permalink
remove production only logic
Browse files Browse the repository at this point in the history
  • Loading branch information
le4ker committed Feb 13, 2024
1 parent 0bbc8b7 commit 0e75459
Show file tree
Hide file tree
Showing 7 changed files with 297 additions and 261 deletions.
1 change: 1 addition & 0 deletions _config.dev.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
url: "0.0.0.0:4000"
baseurl: ""
force-https: False
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ url: "https://le4ker.github.io"
# NB! Without this *nothing* will work, because it's used in every path :)
baseurl: /personal-jekyll-theme
# Google tracking id
google-tracking-id: ""
google-tracking-id: False
# Forces https everywhere in your website, except when you serve it locally
# If you are not hosted on Github Pages, and your host doesn't support https
# then you should disable it
Expand Down
2 changes: 1 addition & 1 deletion _includes/force-https.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if site.force-https and jekyll.environment == "production" %}
{% if site.force-https %}

<!-- Force HTTPS Start -->
<script>
Expand Down
108 changes: 59 additions & 49 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!-- HEAD Start -->

<head>

{% include force-https.html %}

<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -23,7 +25,7 @@
<!-- Custom CSS -->
<link href="{{site.baseurl}}/css/grayscale.css" rel="stylesheet" />
{% if page.section-type == "index" %}
<link href="{{site.baseurl}}/css/timeline.css" rel="stylesheet" />
<link href="{{site.baseurl}}/css/timeline.css" rel="stylesheet" />
{% endif %}

<!-- Custom Fonts -->
Expand All @@ -49,57 +51,65 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
{% if site.favicon %}
<link
rel="shortcut icon"
type="image/x-icon"
href="{{site.baseurl}}{{site.favicon}}"
/>
{% endif %} {% if page.url == "/404.html" | prepend: {{site.baseurl}} %}
<meta http-equiv="refresh" content="20; url={{site.baseurl}}/" />
{% endif %} {% include web-app.html %} {% include color-browser.html %} {%
include syntax-highlight.html %} {% if jekyll.environment == "production" %}
<link
rel="shortcut icon"
type="image/x-icon"
href="{{site.baseurl}}{{site.favicon}}"
/>
{% endif %}

{% if page.url == "/404.html" | prepend: {{site.baseurl}} %}
<meta http-equiv="refresh" content="20; url={{site.baseurl}}/" />
{% endif %}

{% include web-app.html %}

{% include color-browser.html %}

{% include syntax-highlight.html %}

{% if site.google-tracking-id %}

<!-- Cookie Consent by TermsFeed https://www.TermsFeed.com -->
<script
type="text/javascript"
src="https://www.termsfeed.com/public/cookie-consent/4.1.0/cookie-consent.js"
charset="UTF-8"
></script>
<script type="text/javascript" charset="UTF-8">
document.addEventListener("DOMContentLoaded", function () {
cookieconsent.run({
notice_banner_type: "simple",
consent_type: "express",
palette: "light",
language: "en",
page_load_consent_levels: ["strictly-necessary"],
notice_banner_reject_button_hide: false,
preferences_center_close_button_hide: false,
page_refresh_confirmation_buttons: false,
website_name: "{{ site.url }}",
<!-- Cookie Consent by TermsFeed https://www.TermsFeed.com -->
<script
type="text/javascript"
src="https://www.termsfeed.com/public/cookie-consent/4.1.0/cookie-consent.js"
charset="UTF-8"
></script>
<script type="text/javascript" charset="UTF-8">
document.addEventListener("DOMContentLoaded", function () {
cookieconsent.run({
notice_banner_type: "simple",
consent_type: "express",
palette: "light",
language: "en",
page_load_consent_levels: ["strictly-necessary"],
notice_banner_reject_button_hide: false,
preferences_center_close_button_hide: false,
page_refresh_confirmation_buttons: false,
website_name: "{{ site.url }}",
});
});
});
</script>

<!-- Google Analytics -->

<script
type="text/plain"
data-cookie-consent="tracking"
async
src="https://www.googletagmanager.com/gtag/js?id={{site.google-tracking-id}}"
></script>
<script type="text/plain" data-cookie-consent="tracking">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{site.google-tracking-id}}');
</script>

<!-- Google Analytics -->

{% endif %} {% endif %}
</script>

<!-- Google Analytics -->

<script
type="text/plain"
data-cookie-consent="tracking"
async
src="https://www.googletagmanager.com/gtag/js?id={{site.google-tracking-id}}"
></script>
<script type="text/plain" data-cookie-consent="tracking">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{site.google-tracking-id}}');
</script>

<!-- Google Analytics -->

{% endif %}
</head>

<!-- HEAD End -->
43 changes: 26 additions & 17 deletions _includes/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
});
</script>

{% endif %} {% if site.syntax-highlight and page.section-type == "post" %}
{% endif %}

{% if site.syntax-highlight and page.section-type == "post" %}

<!-- Syntax highlight in post pages-->

Expand All @@ -66,9 +68,9 @@
hljs.initHighlightingOnLoad();
</script>

{% endif %} {% if jekyll.environment == "production" %} {% if
site.google-tracking-id %} {% endif %} {% endif %} {% if site.disqus-shortname
and jekyll.environment == "production" %}
{% endif %}

{% if site.disqus-shortname %}

<!-- Disqus -->

Expand All @@ -88,8 +90,9 @@
})();
</script>

{% endif %} {% if page.section-type == "post" or page.section-type == "blog" or
page.section-type == "index" or page.section-type == "tag" %}
{% endif %}

{% if page.section-type == "post" or page.section-type == "blog" or page.section-type == "index" or page.section-type == "tag" %}

<!-- Comments Counter Start -->

Expand All @@ -112,15 +115,21 @@

<!-- Comments Counter End -->

{% endif %} {% endif %} {% if page.section-type == "post" %}
{% endif %}

{% endif %}

{% if page.section-type == "post" %}

<!-- Share buttons Start -->

<script src="{{site.baseurl}}/js/rrssb.min.js"></script>

<!-- Share buttons End -->

{% endif %} {% if site.dynamic-typing and page.section-type == "index" %}
{% endif %}

{% if site.dynamic-typing and page.section-type == "index" %}

<!-- Dynamic Typing Start -->

Expand Down Expand Up @@ -155,15 +164,15 @@
shuffle(myQuotes)
{% endif %}

$(".intro-text").typed({
strings: myQuotes,
typeSpeed: {{ site.type-speed }},
backDelay: {{ site.delete-delay }},
startDelay: {{ site.start-delay }},
loop: {{ site..loop }},
loopCount: {{ site.loop-count }},
cursorChar: "|"
});
$(".intro-text").typed({
strings: myQuotes,
typeSpeed: {{ site.type-speed }},
backDelay: {{ site.delete-delay }},
startDelay: {{ site.start-delay }},
loop: {{ site..loop }},
loopCount: {{ site.loop-count }},
cursorChar: "|"
});
</script>

<!-- Dynamic Typing End -->
Expand Down
Loading

0 comments on commit 0e75459

Please sign in to comment.