diff --git a/_config.yml b/_config.yml index 3aa3cb82..2c93bee8 100644 --- a/_config.yml +++ b/_config.yml @@ -16,9 +16,21 @@ exclude: - node_modules keep_files: ["css"] +# Plugins +gems: + - jekyll-redirect-from + # Front matter defaults defaults: - scope: path: "" # an empty string here means all files in the project values: layout: default + - scope: + path: "filters" + values: + type: filter + - scope: + path: "tags" + values: + type: tag diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 0b91eb29..dfe0a121 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -9,7 +9,7 @@ {% endfor %} diff --git a/basics/index.html b/basics/index.html deleted file mode 100644 index 1ab753a4..00000000 --- a/basics/index.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: default ---- - diff --git a/basics/introduction.md b/basics/introduction.md index 940952af..ed8a7e98 100644 --- a/basics/introduction.md +++ b/basics/introduction.md @@ -1,5 +1,7 @@ --- title: Introduction +redirect_from: + - /basics/ --- Liquid code can be categorized into [**objects**](#objects), [**tags**](#tags), and [**filters**](#filters). diff --git a/filters/index.html b/filters/index.html deleted file mode 100644 index 43d6324a..00000000 --- a/filters/index.html +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: default ---- - -{% for doc in site.collections["filters"].docs %} -

{{ doc.title }}

-
- {{ doc.content }} -
-{% endfor %} diff --git a/filters/index.md b/filters/index.md new file mode 100644 index 00000000..7cd78ce6 --- /dev/null +++ b/filters/index.md @@ -0,0 +1,14 @@ +--- +title: Filters +type: index +--- + +**Filters** change the output of a Liquid object. You can append one or more filters to an object by separating the filter and its parameters by a pipe symbol `|`. + +{% assign filter_pages = site.pages | where: 'type', 'filter' %} + +{% for item in filter_pages %} +## [{{ item.title }}]({{ item.url }}) + +{{ item.content }} +{% endfor %} diff --git a/tags/index.md b/tags/index.md new file mode 100644 index 00000000..4684acf3 --- /dev/null +++ b/tags/index.md @@ -0,0 +1,16 @@ +--- +title: Tags +type: index +--- + +**Tags** create the logic and control flow for templates. They are denoted by curly braces and percent signs: {% raw %}`{%` and `%}`{% endraw %}. + +The markup used in tags does not produce any visible text. This means that you can assign variables and create conditions and loops without showing any of the Liquid logic on the page. + +{% assign tag_pages = site.pages | where: 'type', 'tag' %} + +{% for item in tag_pages %} +## [{{ item.title }}]({{ item.url }}) + +{{ item.content }} +{% endfor %}