Skip to content

Instantly share code, notes, and snippets.

@pmeissner
Created August 4, 2013 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmeissner/6149980 to your computer and use it in GitHub Desktop.
Save pmeissner/6149980 to your computer and use it in GitHub Desktop.
blog template in jade
{{ if segment_2 }}
h2.blog-title: a(href="../blog", title="blog") In the Loupe
article.blog-article(itemscope itemtype="http://schema.org/Article")
header.blog-article__header
h1.blog-article__title(itemprop="name") {{ title|widont }}
.blog-article__featured-image
img(src="{{ transform src='{{ featured_image }}' width='1200' height='600' action='smart' }}", alt="{{ title }} Featured Image", itemprop="image")
.blog-article__meta.blog-article__meta--list-left.hide-for-small
ul
li <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ author }}</span></span>
li: time(itemprop="datePublished", content="{{ datestamp format='Y-m-d' }}", pubdate="pubdate", date="{{ datestamp format='Y-m-d' }}"){{ datestamp format="M d Y" }}
li: a(href="{{ permalink }}#disqus_thread") Comments
li: a(href="{{ permalink }}", title="{{ title }}", itemprop="url") Permalink
.blog-article__body(itemprop="articleBody")
{{ content }}
footer.blog-article__meta--footer
.meta-title Categories: <span itemprop="articleSection">{{ categories_url_list }}</span>
.meta-title Tags: <span itemprop="keywords">{{ tags_url_list|title }}</span>
ul.blog-pager.blog-pager__next-prev
{{ if prev }}{{ entries:listing folder="blog" conditions="url:{ prev }" }}
li: a(href="{{ prev }}", title="{{ title }}") <i class="icon-left-bold"></i> {{ title }}
{{ /entries:listing }}{{ else }}
li <span class="disabled">&nbsp;</span>{{ endif }}
{{ if next }}{{ entries:listing folder="blog" conditions="url:{ next }" }}
li: a(href="{{ next }}", title="{{ title }}") {{ title }} <i class="icon-right-bold"></i>
{{ /entries:listing }}{{ else }}
li <span class="disabled">&nbsp;</span>{{ endif }}
section#disqus_thread
h3 Leave Your Comments
{{ disqus:comments account="{ disqus_account }" }}
script(type="text/javascript",src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51dd245576a6c463")
script(type="text/javascript")
addthis.layers({
'theme' : 'dark',
'share' : {
'position' : 'right',
'numPreferredServices' : 4
},
'whatsnext' : {}
});
script(src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?lang=yaml&lang=css&skin=sunburst", type="text/javascript")
{{ else }}
h1.blog-title In the Loupe
.blog-list{{ entries:listing folder="blog" limit="12" }}
include ../partials/blog-index-article
{{ /entries:listing }}
ul.blog-pager.blog-pager__index
{{ entries:pagination folder="blog" limit="12" }}
include ../partials/pagination
{{ /entries:pagination }}
{{ endif }}
include ../partials/blog_sidebar
script(type="text/javascript")
var disqus_shortname = '{{ disqus_account }}';
(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);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment