Skip to content

Commit 2f30eea

Browse files
committed
ganalytics, twitter, disqus
1 parent 4eb3ca1 commit 2f30eea

File tree

10 files changed

+338
-7
lines changed

10 files changed

+338
-7
lines changed

hugo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@ baseURL = 'https://singhcoder.github.io/'
22
languageCode = 'en-us'
33
title = 'My Personal Blog'
44
theme = 'flat'
5+
googleAnalytics = 'G-TR6P06RWHL'
6+
disqusShortname = 'singhcoder'
7+
[params]
8+
description = "SinghCoder's personal blog"
9+
images = ['site-feature-image.jpg']
10+
[social]
11+
twitter = 'singhhcoder'

layouts/partials/disqus.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<div id="disqus_thread"></div>
2+
<script type="text/javascript">
3+
4+
(function() {
5+
// Don't ever inject Disqus on localhost--it creates unwanted
6+
// discussions from 'localhost:1313' on your Disqus account...
7+
if (window.location.hostname == "localhost")
8+
return;
9+
10+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
11+
var disqus_shortname = '{{ .Site.DisqusShortname }}';
12+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
13+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
14+
})();
15+
</script>
16+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
17+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

layouts/partials/header.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<head>
2+
{{ template "_internal/google_analytics.html" . }}
3+
{{ partial "disqus.html" . }}
4+
{{ template "_internal/twitter_cards.html" . }}
5+
</head>
6+
7+
<header class="header-wrapper">
8+
<div class="header">
9+
<a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
10+
11+
<nav class="menu">
12+
{{ range .Site.Menus.main }}
13+
<div class="menu-item">
14+
{{ if not .Children }}
15+
<a href="{{ .URL }}">{{ .Name }}</a>
16+
{{ else }}
17+
<a>{{ .Name }}↓</a>
18+
<nav class="sub-menu">
19+
{{ range .Children }}
20+
<div class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></div>
21+
{{ end }}
22+
</nav>
23+
{{ end }}
24+
</div>
25+
{{ end }}
26+
</nav>
27+
</div>
28+
</header>

public/categories/index.html

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,46 @@
2929
</head>
3030

3131
<body>
32-
<header class="header-wrapper">
32+
<head>
33+
34+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
35+
<script>
36+
var doNotTrack = false;
37+
if (!doNotTrack) {
38+
window.dataLayer = window.dataLayer || [];
39+
function gtag(){dataLayer.push(arguments);}
40+
gtag('js', new Date());
41+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
42+
}
43+
</script>
44+
45+
<div id="disqus_thread"></div>
46+
<script type="text/javascript">
47+
48+
(function() {
49+
50+
51+
if (window.location.hostname == "localhost")
52+
return;
53+
54+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
55+
var disqus_shortname = 'singhcoder';
56+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
57+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
58+
})();
59+
</script>
60+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
61+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
62+
<meta name="twitter:card" content="summary_large_image"/>
63+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
64+
65+
<meta name="twitter:title" content="Categories"/>
66+
<meta name="twitter:description" content="SinghCoder&#39;s personal blog"/>
67+
<meta name="twitter:site" content="@singhhcoder"/>
68+
69+
</head>
70+
71+
<header class="header-wrapper">
3372
<div class="header">
3473
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
3574

public/index.html

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010

1111
<title>My Personal Blog</title>
1212
<link rel="canonical" href="https://singhcoder.github.io/">
13+
<meta name="description" content="SinghCoder&#39;s personal blog" />
1314
<meta property="og:type" content="article" />
1415
<meta property="og:title" content="My Personal Blog" />
1516
<meta property="og:url" content="https://singhcoder.github.io/" />
17+
<meta property="og:description" content="SinghCoder&#39;s personal blog" />
1618
<link rel="alternate" type="application/rss+xml" href="https://singhcoder.github.io/index.xml" title="My Personal Blog" />
1719

1820

@@ -30,7 +32,46 @@
3032
</head>
3133

3234
<body>
33-
<header class="header-wrapper">
35+
<head>
36+
37+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
38+
<script>
39+
var doNotTrack = false;
40+
if (!doNotTrack) {
41+
window.dataLayer = window.dataLayer || [];
42+
function gtag(){dataLayer.push(arguments);}
43+
gtag('js', new Date());
44+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
45+
}
46+
</script>
47+
48+
<div id="disqus_thread"></div>
49+
<script type="text/javascript">
50+
51+
(function() {
52+
53+
54+
if (window.location.hostname == "localhost")
55+
return;
56+
57+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
58+
var disqus_shortname = 'singhcoder';
59+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
60+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
61+
})();
62+
</script>
63+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
64+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
65+
<meta name="twitter:card" content="summary_large_image"/>
66+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
67+
68+
<meta name="twitter:title" content="My Personal Blog"/>
69+
<meta name="twitter:description" content="SinghCoder&#39;s personal blog"/>
70+
<meta name="twitter:site" content="@singhhcoder"/>
71+
72+
</head>
73+
74+
<header class="header-wrapper">
3475
<div class="header">
3576
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
3677

public/posts/fitness-track/index.html

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,48 @@
3434
</head>
3535

3636
<body>
37-
<header class="header-wrapper">
37+
<head>
38+
39+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
40+
<script>
41+
var doNotTrack = false;
42+
if (!doNotTrack) {
43+
window.dataLayer = window.dataLayer || [];
44+
function gtag(){dataLayer.push(arguments);}
45+
gtag('js', new Date());
46+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
47+
}
48+
</script>
49+
50+
<div id="disqus_thread"></div>
51+
<script type="text/javascript">
52+
53+
(function() {
54+
55+
56+
if (window.location.hostname == "localhost")
57+
return;
58+
59+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
60+
var disqus_shortname = 'singhcoder';
61+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
62+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
63+
})();
64+
</script>
65+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
66+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
67+
<meta name="twitter:card" content="summary_large_image"/>
68+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
69+
70+
<meta name="twitter:title" content="Fitness Track"/>
71+
<meta name="twitter:description" content="Fitness Tracking 🔗The post will describe how I track my fitness journey so far.
72+
Slight background: I am on the journey to be the person who goes to gym daily, my goal is to reduce weight, and get lean. I go to cult for gym.
73+
What all I track so far? 🔗 Weight (morning and night) Number of weeks I had been regular in gym/number of classes attended. Occasional BMI and other metrics from InBody machine installed in the gym I go to."/>
74+
<meta name="twitter:site" content="@singhhcoder"/>
75+
76+
</head>
77+
78+
<header class="header-wrapper">
3879
<div class="header">
3980
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
4081

public/posts/index.html

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,46 @@
2929
</head>
3030

3131
<body>
32-
<header class="header-wrapper">
32+
<head>
33+
34+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
35+
<script>
36+
var doNotTrack = false;
37+
if (!doNotTrack) {
38+
window.dataLayer = window.dataLayer || [];
39+
function gtag(){dataLayer.push(arguments);}
40+
gtag('js', new Date());
41+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
42+
}
43+
</script>
44+
45+
<div id="disqus_thread"></div>
46+
<script type="text/javascript">
47+
48+
(function() {
49+
50+
51+
if (window.location.hostname == "localhost")
52+
return;
53+
54+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
55+
var disqus_shortname = 'singhcoder';
56+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
57+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
58+
})();
59+
</script>
60+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
61+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
62+
<meta name="twitter:card" content="summary_large_image"/>
63+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
64+
65+
<meta name="twitter:title" content="Posts"/>
66+
<meta name="twitter:description" content="SinghCoder&#39;s personal blog"/>
67+
<meta name="twitter:site" content="@singhhcoder"/>
68+
69+
</head>
70+
71+
<header class="header-wrapper">
3372
<div class="header">
3473
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
3574

public/posts/my-first-post/index.html

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,48 @@
3434
</head>
3535

3636
<body>
37-
<header class="header-wrapper">
37+
<head>
38+
39+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
40+
<script>
41+
var doNotTrack = false;
42+
if (!doNotTrack) {
43+
window.dataLayer = window.dataLayer || [];
44+
function gtag(){dataLayer.push(arguments);}
45+
gtag('js', new Date());
46+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
47+
}
48+
</script>
49+
50+
<div id="disqus_thread"></div>
51+
<script type="text/javascript">
52+
53+
(function() {
54+
55+
56+
if (window.location.hostname == "localhost")
57+
return;
58+
59+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
60+
var disqus_shortname = 'singhcoder';
61+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
62+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
63+
})();
64+
</script>
65+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
66+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
67+
<meta name="twitter:card" content="summary_large_image"/>
68+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
69+
70+
<meta name="twitter:title" content="My First Post"/>
71+
<meta name="twitter:description" content="Hey There 👋 🔗Alright, I had been thinking for a long time to start writing a blog. Not necessarily something technical, but just dump some of the thoughts, learnings, and resources for my future self. Starting out finally now, and this is the first post.
72+
Well, that was it for the first post, stay tuned for the next one.
73+
Scoop: next one is gonna be something related to the fitness journey I am on."/>
74+
<meta name="twitter:site" content="@singhhcoder"/>
75+
76+
</head>
77+
78+
<header class="header-wrapper">
3879
<div class="header">
3980
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
4081

public/tags/fitness/index.html

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,46 @@
2929
</head>
3030

3131
<body>
32-
<header class="header-wrapper">
32+
<head>
33+
34+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TR6P06RWHL"></script>
35+
<script>
36+
var doNotTrack = false;
37+
if (!doNotTrack) {
38+
window.dataLayer = window.dataLayer || [];
39+
function gtag(){dataLayer.push(arguments);}
40+
gtag('js', new Date());
41+
gtag('config', 'G-TR6P06RWHL', { 'anonymize_ip': false });
42+
}
43+
</script>
44+
45+
<div id="disqus_thread"></div>
46+
<script type="text/javascript">
47+
48+
(function() {
49+
50+
51+
if (window.location.hostname == "localhost")
52+
return;
53+
54+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
55+
var disqus_shortname = 'singhcoder';
56+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
57+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
58+
})();
59+
</script>
60+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
61+
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
62+
<meta name="twitter:card" content="summary_large_image"/>
63+
<meta name="twitter:image" content="https://singhcoder.github.io/site-feature-image.jpg"/>
64+
65+
<meta name="twitter:title" content="fitness"/>
66+
<meta name="twitter:description" content="SinghCoder&#39;s personal blog"/>
67+
<meta name="twitter:site" content="@singhhcoder"/>
68+
69+
</head>
70+
71+
<header class="header-wrapper">
3372
<div class="header">
3473
<a class="site-title" href="https://singhcoder.github.io/">My Personal Blog</a>
3574

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy