Skip to content

Commit

Permalink
feat(base): add ga and github comment
Browse files Browse the repository at this point in the history
  • Loading branch information
boorownie committed Nov 28, 2019
1 parent 3fa441c commit 702d125
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 28 deletions.
9 changes: 4 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Site settings
title: 맨땅에 코딩
description:
url: https://boorownie.github.io
url: https://boorownie.github.io
author: Boorownie

# Google Analytics
#google_analytics: UA—XXXXXXXX-X
google_analytics: UA-147207658-1

# Build settings
markdown: kramdown
Expand All @@ -28,6 +29,4 @@ permalink: /:year-:month-:day/:title
paginate: 5

# Disqus (Set to your disqus id)
#disqus: jekyll-tale

theme: jekyll-theme-minimal
#disqus: jekyll-tale
11 changes: 7 additions & 4 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.google_analytics }}');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
11 changes: 0 additions & 11 deletions _includes/disqus_comments.html

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer>
<span>
&copy; <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time> {{ site.author.name }}. Made with Jekyll using the <a href="https://github.com/chesterhow/tale/">Tale</a> theme.
&copy; <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time> {{ site.author }}. Powered by <a href="https://jekyllrb.com">jekyll</a> and <a href="https://github.com/chesterhow/tale/">Tale</a>.
</span>
</footer>
8 changes: 4 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<!--&lt;!&ndash; RSS &ndash;&gt;-->
<!--{% feed_meta %}-->

<!--&lt;!&ndash; Google Analytics&ndash;&gt;-->
<!--{% if site.google_analytics and jekyll.environment == 'production' %}-->
<!--{% include analytics.html %}-->
<!--{% endif %}-->
<!-- Google Analytics-->
{% if site.google_analytics and jekyll.environment == 'production' %}
{% include analytics.html %}
{% endif %}
</head>
10 changes: 7 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ <h1 class="post-title">{{ page.title }}</h1>
{{ content }}
</div>

{% if page.comments %}
{% include disqus_comments.html %}
{% endif %}
<script src="https://utteranc.es/client.js"
repo="boorownie/blog-comment"
issue-term="pathname"
theme="github-light"
crossorigin="anonymous"
async>
</script>

<div class="pagination">
{% if page.next.url %}
Expand Down

0 comments on commit 702d125

Please sign in to comment.