add disqus and show adsense only on posts

This commit is contained in:
Philipp Oppermann
2015-07-28 17:48:03 +02:00
parent fe9e7e9eae
commit 3aea2c209f
3 changed files with 17 additions and 2 deletions

13
_includes/disqus.html Normal file
View File

@@ -0,0 +1,13 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'phil-opp';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

View File

@@ -21,8 +21,6 @@
{{ content }}
</main>
{% include google_adsense.html %}
<footer class="footer">
<small>
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved. <a href="{{ site.contact }}">Contact</a>

View File

@@ -6,4 +6,8 @@ layout: default
<h1 class="post-title">{{ page.title }}</h1>
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time>
{{ content }}
{% include google_adsense.html %}
{% include disqus.html %}
</article>