Merge branch 'hotfix/disqus-comments' into develop

This commit is contained in:
Michael Rose 2013-06-26 09:33:29 -04:00
commit 104dc76bda
12 changed files with 50 additions and 3 deletions

View file

@ -54,6 +54,14 @@ so-simple-theme/
Most of the variables found here are used in the .html files found in `_includes` if you need to add or remove anything. A good place to start would be to change the title, tagline, description, and url of your site. When working locally comment out `url` or else you will get a bunch of broken links because they are absolute and prefixed with `{{ site.url }}` in the various `_includes` and `_layouts`. Just remember to uncomment `url` when building for deployment or pushing to **gh-pages**...
#### Disqus Comments
Create a [Disqus](http://disqus.com) account and change `disqus_shortname` in `_config.yml` to the Disqus *shortname* you just setup. To enable commenting on a post, add the following to its front matter:
``` yaml
comments: true
```
#### Owner/Author Information
Change your name, and avatar photo (200x200 pixels or larger), email, and social networking urls. If you want to link to an external image on Gravatar or something similiar you'll need to edit the path in `head.html` since it assumes it is located in `/images`.
@ -149,8 +157,8 @@ To make things easier I use LESS to build So Simple Theme's stylesheets. If you
// --------------------------------------------------
@body-color : #ebebeb;
@text-color : #333;
@base-color : #343434;
@comp-color : spin(@base-color, 180);
@base-color : #343434;
@comp-color : spin(@base-color, 180);
@border-color : @base-color;
@white : #fff;
@black : #000;

View file

@ -1,6 +1,7 @@
title: So Simple Theme
description: A simple and clean responsive Jekyll theme for words and photos.
logo: site-logo.png
disqus_shortname: sosimpletheme
#Comment out url when working locally to resolve base urls correctly
url: http://mmistakes.github.io/so-simple-theme

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

@ -15,4 +15,5 @@
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</script>
{% include disqus_comments.html %}

View file

@ -24,10 +24,12 @@
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
<span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">By <span itemprop="name"><a href="{{ site.url }}/about" title="About {{ site.owner.name }}" itemprop="url">{{ site.owner.name }}</a></span></span>
<span class="entry-date"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %d, %Y" }}</time></span>
{% if page.comments %}<span class="entry-comments"><a href="#disqus_thread">Comment</a></span>{% endif %}
<span><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }}"><i class="icon-link"></i> Permalink</a></span>
</footer>
<div class="entry-content">
{{ content }}
{% if page.comments %}<div id="disqus_thread"></div><!-- /#disqus_thread -->{% endif %}
</div><!-- /.entry-content -->
</div><!-- /.entry-wrapper -->
</article>

View file

@ -7,6 +7,7 @@ category: articles
tags: [sample post]
image:
feature: so-simple-sample-image-1.jpg
comments: true
---
Below is just about everything you'll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.

View file

@ -6,6 +6,7 @@ category: articles
tags: [sample post, readability, test, intro]
image:
feature: so-simple-sample-image-2.jpg
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.

View file

@ -4,6 +4,7 @@ title: "A Post with Images"
description: "Examples and code for displaying images in posts."
category: articles
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.

View file

@ -6,6 +6,7 @@ category: articles
tags: [sample post, readability]
image:
feature: so-simple-sample-image-3.jpg
comments: true
---
This is a sample post with a large feature image[^1] up top and tons of text. 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

@ -4,6 +4,7 @@ title: "A Post with a Video"
description: "Custom written post descriptions are the way to go... if you're not lazy."
category: articles
tags: [sample post, video]
comments: true
---
<iframe width="560" height="315" src="http://www.youtube.com/embed/SqYiglufb8Y" frameborder="0"> </iframe>

View file

@ -16,6 +16,7 @@ Looking for a simple, responsive, theme for your Jekyll powered blog? Well look
* Minimal embellishments and subtle animations.
* Readable typography to make your words shine.
* Support for large images to call out your favorite posts.
* Disqus comments if you choose to enable.
* Simple and clear permalink structure[^1].
* Tags for [Open Graph](https://developers.facebook.com/docs/opengraph/) and [Twitter Cards](https://dev.twitter.com/docs/cards) for a better social sharing experience.

View file

@ -48,6 +48,14 @@ so-simple-theme/
Most of the variables found here are used in the .html files found in `_includes` if you need to add or remove anything. A good place to start would be to change the title, tagline, description, and url of your site. When working locally comment out `url`[^1] or else you will get a bunch of broken links because they are absolute and prefixed with `{{ "{{ site.url " }}}}` in the various `_includes` and `_layouts`. Just remember to uncomment `url` when building for deployment or pushing to **gh-pages**...
#### Disqus Comments
Create a [Disqus](http://disqus.com) account and change `disqus_shortname` in `_config.yml` to the Disqus *shortname* you just setup. To enable commenting on a post, add the following to its front matter:
{% highlight yaml %}
comments: true
{% endhighlight %}
#### Owner/Author Information
Change your name, and avatar photo (200x200 pixels or larger), email, and social networking urls. If you want to link to an external image on Gravatar or something similiar you'll need to edit the path in `head.html` since it assumes it is located in `/images`.