Adjusting layout so that every Basics and Tags' content output their own pages

This commit is contained in:
Tetsuro
2015-10-15 16:29:00 -04:00
parent ea54777dd2
commit 68e39b624a
10 changed files with 62 additions and 54 deletions
+8
View File
@@ -6,12 +6,20 @@ permalink: /:year/:month/:day/:basename:output_ext
collections: collections:
basics: basics:
output: true output: true
permalink: /basics/:path/
filters: filters:
output: true output: true
tags: tags:
output: true output: true
permalink: /tags/:path/
exclude: exclude:
- README.md - README.md
- CNAME - CNAME
- node_modules - node_modules
keep_files: ['css'] keep_files: ['css']
defaults:
-
scope:
path: "" # an empty string here means all files in the project
values:
layout: "default"
+43 -15
View File
@@ -21,21 +21,49 @@
<a href="/">Liquid</a> <a href="/">Liquid</a>
</div> </div>
<nav class="sidebar--nav"> <nav class="sidebar--nav">
{% for collection in site.collections %}
{% assign section_title = collection[0] %} <!-- Basics -->
<ul class="section"> <ul class="section">
<li> <li>
<h3 class="section__header">{{ section_title | capitalize }}</h3> <h3 class="section__header">Basics</h3>
<ul class="section__links"> <ul class="section__links">
{% for doc in site.collections[section_title].docs %} {% for doc in site.collections["basics"].docs %}
<li> <li>
<a href="/{{ collection[0] }}#{{ doc.title }}" class="section__link">{{ doc.title }}</a> <a href="/basics/{{ doc.title | slugify }}" class="section__link">{{ doc.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>
</ul> </ul>
{% endfor %}
<!-- Tags -->
<ul class="section">
<li>
<h3 class="section__header">Tags</h3>
<ul class="section__links">
{% for doc in site.collections["tags"].docs %}
<li>
<a href="/tags/{{ doc.title | slugify }}" class="section__link">{{ doc.title }}</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
<!-- Filters -->
<ul class="section">
<li>
<h3 class="section__header">Filters</h3>
<ul class="section__links">
{% for doc in site.collections["filters"].docs %}
<li>
<a href="/filters#{{ doc.title }}" class="section__link">{{ doc.title }}</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
</nav> </nav>
</div> </div>
@@ -5,7 +5,7 @@ title: Control Flow
Control Flow tags determine which block of code should be executed based on different conditions. Control Flow tags determine which block of code should be executed based on different conditions.
### if ## if
<p>Executes a block of code only if a certain condition is met.</p> <p>Executes a block of code only if a certain condition is met.</p>
@@ -28,7 +28,7 @@ These shoes are awesome!
</div> </div>
### elsif / else ## elsif / else
<p>Adds more conditions within an <code>if</code> or <code>unless</code> block.</p> <p>Adds more conditions within an <code>if</code> or <code>unless</code> block.</p>
@@ -58,8 +58,7 @@ Hey Anonymous!
## case/when
### 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>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>
@@ -93,13 +92,7 @@ This is a cake
## unless
### 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>Similar to <code>if</code>, but executes a block of code only if a certain condition is <strong>not</strong> met.</p>
-15
View File
@@ -1,15 +0,0 @@
---
title: Tags
---
Liquid _tags_ are the programming logic that tells templates what to do. Tags are wrapped in: <code>{&#37;</code> <code>&#37;}</code>.
Certain tags, such as <a href="#for"><code>for</code></a> and <a href="#cycle"><code>cycle</code></a> can take on parameters. Details for each parameter can be found in their respective sections.
Tags can be broken down into four categories:
- [Control Flow Tags](/themes/liquid-documentation/tags/control-flow-tags/)
- [Iteration Tags](/themes/liquid-documentation/tags/iteration-tags/)
- [Theme Tags](/themes/liquid-documentation/tags/theme-tags/)
- [Variable Tags](/themes/liquid-documentation/tags/variable-tags/)
+2 -8
View File
@@ -2,11 +2,5 @@
layout: default layout: default
--- ---
{% for doc in site.collections["tags"].docs %} Tags here.
<div id="{{ doc.title }}" class="content__item">
<h2 class="content__header">{{ doc.title }}</h2>
<div class="content">
{{ doc.content }}
</div>
</div>
{% endfor %}