Re-organizing basics content, starting to remove Shopify-specific content

This commit is contained in:
Tetsuro
2015-08-28 12:28:11 -04:00
parent d4c1429ea7
commit 57ccbd4898
12 changed files with 56 additions and 93 deletions

View File

@@ -15,12 +15,10 @@ require('load-grunt-tasks')(grunt);
atBegin: true
}
},
jekyll: {
files: ['index.html', '_includes/*.html', '_filters/*.*', '_layouts/*.*', '_posts/*.*'],
files: ['index.md', '_includes/*.html', '_filters/*.*', '_layouts/*.*', '_tags/*.*', '_basics/*.*'],
tasks: ['shell:jekyllBuild']
}
},
sass: {

View File

@@ -2,16 +2,9 @@
title: Handles
---
# Handles
### What is a handle
<a id="topofpage"></a>
## What is a handle
The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, link list) has a handle.
The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).
For example, a page with the title "About Us" can be accessed in Liquid via its handle <tt>about-us</tt> as shown below:
@@ -20,7 +13,7 @@ For example, a page with the title "About Us" can be accessed in Liquid via its
{{ pages.about-us.content }}
{% endraw %}{% endhighlight %}
## How are my handles created?
### How are my handles created?
A product with the title "Shirt" will automatically be given the handle **shirt**. If there is already a product with the handle "Shirt", the handle will auto-increment. In other words, all "Shirt" products created after the first one will receive the handle **shirt-1**, **shirt-2**, and so on.

View File

@@ -2,14 +2,9 @@
title: Operators
---
# Operators
Liquid has access to all of the logical and comparison operators.
<a id="topofpage"></a>
Liquid has access to all of the logical and comparison operators. These can be used in tags such as <a href="/themes/liquid-documentation/tags/control-flow-tags/#if">if</a> and <a href="/themes/liquid-documentation/tags/control-flow-tags/#unless">unless</a>.
## Basic Operators
### Basic Operators
<table>
<tbody>
@@ -77,7 +72,7 @@ Operators can be chained together.
## Contains operator
### Contains operator
<code>contains</code> checks for the presence of a substring inside a string.

View File

@@ -1,40 +0,0 @@
---
title: Basics
---
# Introduction
Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts.
<iframe width="560" height="315" src="//www.youtube.com/embed/tZLTExLukSg" frameborder="0" allowfullscreen style="margin: 0 auto 24px auto; width: 70%; display: block; padding: 20px 15%; background: #f9f9f9;"></iframe>
Liquid uses a combination of _tags_, _objects_, and _filters_ to load dynamic content. They are used inside Liquid _template files_, which are a group of files that make up a theme. For more information on the available templates, please see <a href="/themes/theme-development/templates/">Theme Development</a>.
## Tags
Tags make up the programming logic that tells templates what to do.
{% raw %}
{% if user.name == 'elvis' %}
Hey Elvis
{% endif %}
{% endraw %}
## Filters
Filters are used to modify the output of strings, numbers, variables, and objects.
{% raw %}
{{ 'sales' | append: '.jpg' }} <!-- Output: sales.jpg -->
{% endraw %}
<p class="tr">
<a class="themes-article-cta" href="/themes/liquid-documentation/filters">Read more &rsaquo;</a>
</p>

View File

@@ -2,10 +2,6 @@
title: Truthy and Falsy
---
# Truthy and Falsy in Liquid
In programming, we describe “truthy” and “falsy” as anything that returns true or false, respectively, when used inside an if statement.
## What is truthy?

View File

@@ -0,0 +1,8 @@
<header class="home--banner">
<h1>Liquid</h1>
<p>Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.</p>
<p class="btn-row">
<a href="https://github.com/Shopify/liquid/archive/master.zip" target="_blank" class="btn"><i class="icon fa fa-2x fa-arrow-circle-down"></i>Download</a>
<a href="https://github.com/Shopify/liquid" target="_blank" class="btn"><i class="icon fa fa-2x fa-github"></i>View on Github</a>
</p>
</header>

View File

@@ -12,3 +12,7 @@ p {
.content__item {
margin-bottom: $spacing-unit * 2;
}
.content__header {
font-weight: bold;
}

View File

@@ -4,7 +4,7 @@ layout: default
{% for doc in site.collections["basics"].docs %}
<div id="{{ doc.title }}" class="content__item">
<h2>{{ doc.title }}</h2>
<h2 class="content__header">{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>

View File

@@ -4,7 +4,7 @@ layout: default
{% for doc in site.collections["filters"].docs %}
<div id="{{ doc.title }}" class="content__item">
<h2>{{ doc.title }}</h2>
<h2 class="content__header">{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>

View File

@@ -1,25 +0,0 @@
---
layout: default
---
<div class="home">
<header class="home--banner">
<h1>Liquid</h1>
<p>Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.</p>
<p class="btn-row">
<a href="https://github.com/Shopify/liquid/archive/master.zip" target="_blank" class="btn"><i class="icon fa fa-2x fa-arrow-circle-down"></i>Download</a>
<a href="https://github.com/Shopify/liquid" target="_blank" class="btn"><i class="icon fa fa-2x fa-github"></i>View on Github</a>
</p>
</header>
<p>Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.</p>
<p>Liquid has been in production use since June 2006 and is now used by many other hosted web applications.</p>
<p>It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.</p>
# What does it look like???
</div>

34
index.md Normal file
View File

@@ -0,0 +1,34 @@
---
layout: default
---
{% include home-banner.html %}
<p>Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.</p>
<p>Liquid has been in production use since June 2006 and is now used by many other hosted web applications.</p>
<p>It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.</p>
Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts.
Liquid uses a combination of _tags_, _objects_, and _filters_ to load dynamic content. They are used inside Liquid _template files_, which are a group of files that make up a theme. For more information on the available templates, please see <a href="/themes/theme-development/templates/">Theme Development</a>.
## Tags
Tags make up the programming logic that tells templates what to do.
{% raw %}
{% if user.name == 'elvis' %}
Hey Elvis
{% endif %}
{% endraw %}
## Filters
Filters are used to modify the output of strings, numbers, variables, and objects.
{% raw %}
{{ 'sales' | append: '.jpg' }} <!-- Output: sales.jpg -->
{% endraw %}

View File

@@ -4,7 +4,7 @@ layout: default
{% for doc in site.collections["tags"].docs %}
<div id="{{ doc.title }}" class="content__item">
<h2>{{ doc.title }}</h2>
<h2 class="content__header">{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>