mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
Cleanup and config reorg
This commit is contained in:
+11
-6
@@ -1,14 +1,19 @@
|
|||||||
|
title: Liquid Templating Engine
|
||||||
|
description: "Liquid is a template language and accompanying rendering engine. It is built for security, so is perfect for rendering custom templates from your users."
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
baseurl: "" # the subpath of your site, e.g. /blog/
|
baseurl: "" # the subpath of your site, e.g. /blog/
|
||||||
url: "http://liquidmarkup.org" # the base hostname & protocol for your site
|
url: http://liquidmarkup.org # the base hostname & protocol for your site
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
highlighter: pygments
|
highlighter: pygments
|
||||||
permalink: /:year/:month/:day/:basename:output_ext
|
permalink: /:year/:month/:day/:basename:output_ext
|
||||||
exclude:
|
exclude:
|
||||||
- README.md
|
- README.md
|
||||||
- CNAME
|
- CNAME
|
||||||
- node_modules
|
- node_modules
|
||||||
keep_files: ['css']
|
keep_files: ['css']
|
||||||
|
|
||||||
|
# Front matter defaults
|
||||||
defaults:
|
defaults:
|
||||||
- scope:
|
- scope:
|
||||||
path: "" # an empty string here means all files in the project
|
path: "" # an empty string here means all files in the project
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# Site settings
|
|
||||||
title: Liquid Templating Engine
|
|
||||||
description: > # this means to ignore newlines until "baseurl:"
|
|
||||||
Liquid is a template language and accompanying rendering engine.
|
|
||||||
It is built for security, so is perfect for rendering custom
|
|
||||||
templates from your users.
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.data.site.title }}</title>
|
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}</title>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.data.site.description }}{% endif %}">
|
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
|
<link rel="stylesheet" href="{{ '/css/main.css' | prepend: site.baseurl }}">
|
||||||
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
category: control-flow
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
## case/when
|
|
||||||
|
|
||||||
<p>Creates a switch statement to compare a variable with different values. <code>case</code> initializes the switch statement, and <code>when</code> compares its values.</p>
|
|
||||||
|
|
||||||
<p class="input">Input</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
{% assign handle = 'cake' %}
|
|
||||||
{% case handle %}
|
|
||||||
{% when 'cake' %}
|
|
||||||
This is a cake
|
|
||||||
{% when 'cookie' %}
|
|
||||||
This is a cookie
|
|
||||||
{% else %}
|
|
||||||
This is not a cake nor a cookie
|
|
||||||
{% endcase %}
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="output">Output</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
This is a cake
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
## elsif / else
|
|
||||||
|
|
||||||
<p>Adds more conditions within an <code>if</code> or <code>unless</code> block.</p>
|
|
||||||
|
|
||||||
<p class="input">Input</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
<!-- If customer.name = 'anonymous' -->
|
|
||||||
{% if customer.name == 'kevin' %}
|
|
||||||
Hey Kevin!
|
|
||||||
{% elsif customer.name == 'anonymous' %}
|
|
||||||
Hey Anonymous!
|
|
||||||
{% else %}
|
|
||||||
Hi Stranger!
|
|
||||||
{% endif %}
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="output">Output</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
Hey Anonymous!
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
## if
|
|
||||||
|
|
||||||
<p>Executes a block of code only if a certain condition is met.</p>
|
|
||||||
|
|
||||||
<p class="input">Input</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
{% if product.title == 'Awesome Shoes' %}
|
|
||||||
These shoes are awesome!
|
|
||||||
{% endif %}
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="output">Output</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
These shoes are awesome!
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
layout: default
|
|
||||||
---
|
|
||||||
|
|
||||||
TAGS!
|
|
||||||
|
|
||||||
{% for doc in site.collections["tags"].docs %}
|
|
||||||
<div id="{{ doc.title }}" class="content__item">
|
|
||||||
<h2 class="content__header">{{ doc.title }}</h2>
|
|
||||||
<div class="content">
|
|
||||||
{{ doc.content }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
## unless
|
|
||||||
|
|
||||||
<p>Similar to <code>if</code>, but executes a block of code only if a certain condition is <strong>not</strong> met.</p>
|
|
||||||
|
|
||||||
<p class="input">Input</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
{% unless product.title == 'Awesome Shoes' %}
|
|
||||||
These shoes are not awesome.
|
|
||||||
{% endunless %}
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="output">Output</p>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
These shoes are not awesome.
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
This would be the equivalent of doing the following:
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% highlight html %}{% raw %}
|
|
||||||
{% if product.title != 'Awesome Shoes' %}
|
|
||||||
These shoes are not awesome.
|
|
||||||
{% endif %}
|
|
||||||
{% endraw %}{% endhighlight %}
|
|
||||||
</div>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
layout: default
|
|
||||||
---
|
|
||||||
|
|
||||||
sss
|
|
||||||
|
|
||||||
{{ site.collections["tags"] }}
|
|
||||||
|
|
||||||
{% for doc in site.collections["tags"].docs %}
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
@@ -4,8 +4,8 @@ layout: null
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<title>{{ site.data.site.title | xml_escape }}</title>
|
<title>{{ site.title | xml_escape }}</title>
|
||||||
<description>{{ site.data.site.description | xml_escape }}</description>
|
<description>{{ site.description | xml_escape }}</description>
|
||||||
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
||||||
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
||||||
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
||||||
|
|||||||
Reference in New Issue
Block a user