Add XML, HTML and JSON samples for Liquid.

This commit is contained in:
Parker Moore
2014-04-23 23:02:19 -04:00
parent 3c21f8db51
commit cbcbb969d5
5 changed files with 355 additions and 47 deletions

44
samples/Liquid/feed.xml Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
<channel>
<title xml:lang="en">Jekyll • Simple, blog-aware, static sites</title>
<atom:link type="application/atom+xml" href="http://jekyllrb.com/feed.xml" rel="self"/>
<link>http://jekyllrb.com/</link>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<language>en-US</language>
<generator>Jekyll v{{ jekyll.version }}</generator>
<description>Transform your plain text into static websites and blogs.</description>
<image>
<description>Transform your plain text into static websites and blogs.</description>
<url>http://jekyllrb.com/img/logo-rss.png</url>
<title>Jekyll • Simple, blog-aware, static sites</title>
<link>http://jekyllrb.com/</link>
<width>144</width>
<height>73</height>
</image>
{% for post in site.posts %}
<item>
<title>{{ post.title | xml_escape}}</title>
<link>http://jekyllrb.com{{ post.url }}</link>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<dc:creator>{{ post.author }}</dc:creator>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
<guid isPermaLink="true">http://jekyllrb.com{{ post.url }}</guid>
<description>{{ post.content | xml_escape }}</description>
</item>
{% endfor %}
</channel>
</rss>

View File

@@ -0,0 +1,84 @@
<section class="intro">
<div class="grid">
<div class="unit whole center-on-mobiles">
<p class="first">Transform your plain text into static&nbsp;websites and&nbsp;blogs.</p>
</div>
</div>
</section>
<section class="features">
<div class="grid">
<div class="unit one-third">
<h2>Simple</h2>
<p>
No more databases, comment moderation, or pesky updates to install—just <em>your content</em>.
</p>
<a href="/docs/usage/">How Jekyll works &rarr;</a>
</div>
<div class="unit one-third">
<h2>Static</h2>
<p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://textile.sitemonks.com/">Textile</a>), <a href="http://wiki.shopify.com/Liquid">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
<a href="/docs/templates/">Jekyll template guide &rarr;</a>
</div>
<div class="unit one-third">
<h2>Blog-aware</h2>
<p>
Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here.
</p>
<a href="/docs/migrations/">Migrate your blog &rarr;</a>
</div>
<div class="clear"></div>
</div>
</section>
<section class="quickstart">
<div class="grid">
<div class="unit golden-small center-on-mobiles">
<h4>Get up and running <em>in&nbsp;seconds</em>.</h4>
</div>
<div class="unit golden-large code">
<p class="title">Quick-start Instructions</p>
<div class="shell">
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">gem install jekyll</span>
</p>
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">jekyll new my-awesome-site</span>
</p>
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">cd my-awesome-site</span>
</p>
<p class="line">
<span class="path">~/my-awesome-site</span>
<span class="prompt">$</span>
<span class="command">jekyll serve</span>
</p>
<p class="line">
<span class="output"># => Now browse to http://localhost:4000</span>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</section>
<section class="free-hosting">
<div class="grid">
<div class="unit whole">
<div class="grid pane">
<div class="unit whole center-on-mobiles">
<img src="img/octojekyll.png" width="300" height="251" alt="Free Jekyll hosting on GitHub Pages">
<div class="pane-content">
<h2 class="center-on-mobiles"><strong>Free hosting</strong> with GitHub Pages</h2>
<p>Sick of dealing with hosting companies? <a href="http://pages.github.com/">GitHub Pages</a> are <em>powered by Jekyll</em>, so you can easily deploy your site using GitHub for free&mdash;<a href="https://help.github.com/articles/setting-up-a-custom-domain-with-pages">custom domain name</a> and&nbsp;all.</p>
<a href="http://pages.github.com/">Learn more about GitHub Pages &rarr;</a>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
</section>

View File

@@ -0,0 +1 @@
{{ site.posts | jsonify }}