add disqus comments as per hpstr theme

This commit is contained in:
Maximilian Held 2014-03-25 17:25:21 +01:00
parent db2981d253
commit 55d0059f87
11 changed files with 37 additions and 0 deletions

View file

@ -2,6 +2,7 @@ title: Site Title
description: Describe your website. description: Describe your website.
# Your site's domain goes here. Leave localhost server or blank when working locally. # Your site's domain goes here. Leave localhost server or blank when working locally.
url: http://localhost:4000 url: http://localhost:4000
disqus_shortname:
# Owner/author information # Owner/author information
owner: owner:

View file

@ -0,0 +1,21 @@
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
/* * * 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);
})();
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

View file

@ -18,3 +18,6 @@
})(); })();
</script> </script>
{% endif %} {% endif %}
{% if page.comments %}
{% include _disqus_comments.html %}
{% endif %}

View file

@ -39,6 +39,9 @@
<div class="article-wrap"> <div class="article-wrap">
{{ content }} {{ content }}
</div><!-- /.article-wrap --> </div><!-- /.article-wrap -->
{% if site.disqus_shortname and page.comments %}
<section id="disqus_thread"></section><!-- /#disqus_thread -->
{% endif %}
</article> </article>
</div><!-- /#index --> </div><!-- /#index -->

View file

@ -48,6 +48,9 @@
<p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %} by <a href="{{ site.url }}/about" title="About {{ site.owner.name }}">{{ site.owner.name }}</a>.</p> <p class="byline"><strong>{{ page.title }}</strong> was published on <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>{% if page.modified %} and last modified on <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time>{% endif %} by <a href="{{ site.url }}/about" title="About {{ site.owner.name }}">{{ site.owner.name }}</a>.</p>
</footer> </footer>
</div><!-- /.article-wrap --> </div><!-- /.article-wrap -->
{% if site.disqus_shortname and page.comments %}
<section id="disqus_thread"></section><!-- /#disqus_thread -->
{% endif %}
</article> </article>
</div><!-- /#main --> </div><!-- /#main -->

View file

@ -4,6 +4,7 @@ title: Sample Post
description: "Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more." description: "Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more."
modified: 2013-05-31 modified: 2013-05-31
tags: [intro, beginner, jekyll, tutorial] tags: [intro, beginner, jekyll, tutorial]
comments: true
image: image:
feature: texture-feature-05.jpg feature: texture-feature-05.jpg
credit: Texture Lovers credit: Texture Lovers

View file

@ -3,6 +3,7 @@ layout: post
title: "Testing Readability with a Bunch of Text" title: "Testing Readability with a Bunch of Text"
description: "A ton of text to test readability." description: "A ton of text to test readability."
tags: [sample post, readability, test] tags: [sample post, readability, test]
comments: true
--- ---
Portland in shoreditch Vice, labore typewriter pariatur hoodie fap sartorial Austin. Pinterest literally occupy Schlitz forage. Odio ad blue bottle vinyl, 90's narwhal commodo bitters pour-over nostrud. Ugh est hashtag in, fingerstache adipisicing laboris esse Pinterest shabby chic Portland. Shoreditch bicycle rights anim, flexitarian laboris put a bird on it vinyl cupidatat narwhal. Hashtag artisan skateboard, flannel Bushwick nesciunt salvia aute fixie do plaid post-ironic dolor McSweeney's. Cliche pour-over chambray nulla four loko skateboard sapiente hashtag. Portland in shoreditch Vice, labore typewriter pariatur hoodie fap sartorial Austin. Pinterest literally occupy Schlitz forage. Odio ad blue bottle vinyl, 90's narwhal commodo bitters pour-over nostrud. Ugh est hashtag in, fingerstache adipisicing laboris esse Pinterest shabby chic Portland. Shoreditch bicycle rights anim, flexitarian laboris put a bird on it vinyl cupidatat narwhal. Hashtag artisan skateboard, flannel Bushwick nesciunt salvia aute fixie do plaid post-ironic dolor McSweeney's. Cliche pour-over chambray nulla four loko skateboard sapiente hashtag.

View file

@ -3,6 +3,7 @@ layout: post
title: "A Post with Images" title: "A Post with Images"
description: "Examples and code for displaying images in posts." description: "Examples and code for displaying images in posts."
tags: [sample post, images, test] tags: [sample post, images, test]
comments: true
--- ---
Here are some examples of what a post with images might look like. If you want to display two or three images next to each other responsively use `figure` with the appropriate `class`. Each instance of `figure` is auto-numbered and displayed in the caption. Here are some examples of what a post with images might look like. If you want to display two or three images next to each other responsively use `figure` with the appropriate `class`. Each instance of `figure` is auto-numbered and displayed in the caption.

View file

@ -3,6 +3,7 @@ layout: post
title: "Post with Large Feature Image and Text" title: "Post with Large Feature Image and Text"
description: "Custom written post descriptions are the way to go... if you're not lazy." description: "Custom written post descriptions are the way to go... if you're not lazy."
tags: [sample post, readability, test] tags: [sample post, readability, test]
comments: true
image: image:
feature: texture-feature-04.jpg feature: texture-feature-04.jpg
credit: Texture Lovers credit: Texture Lovers

View file

@ -3,6 +3,7 @@ layout: post
title: Syntax Highlighting Post title: Syntax Highlighting Post
description: "Demo post displaying the various ways of highlighting code in Markdown." description: "Demo post displaying the various ways of highlighting code in Markdown."
tags: [sample post, code, highlighting] tags: [sample post, code, highlighting]
comments: true
--- ---
[Syntax highlighting](http://en.wikipedia.org/wiki/Syntax_highlighting) is a feature that displays source code, in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers. [Syntax highlighting](http://en.wikipedia.org/wiki/Syntax_highlighting) is a feature that displays source code, in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.

View file

@ -5,6 +5,7 @@ title: About the Theme
tagline: Minimal Mistakes, a Jekyll Theme tagline: Minimal Mistakes, a Jekyll Theme
tags: [about, Jekyll, theme, responsive] tags: [about, Jekyll, theme, responsive]
modified: 9-9-2013 modified: 9-9-2013
comments: true
image: image:
feature: texture-feature-02.jpg feature: texture-feature-02.jpg
credit: Texture Lovers credit: Texture Lovers