re #51 introduces description_short for index pages

This commit is contained in:
Kilian Ciuffolo
2015-11-09 16:05:57 -08:00
parent 4b4aec3c14
commit 28966efff3
3 changed files with 15 additions and 13 deletions
+5 -13
View File
@@ -1,17 +1,9 @@
{% for link in include.links %}
{% if link.is_folder %}
{% assign title = link.title %}
{% assign description = link.description %}
{% capture url %}{{page.url}}{{link.url}}/{{link.pages[0].url}}/{% endcapture %}
{% else %}
{% capture url %}{{page.url}}{{link.url}}/{% endcapture %}
{% capture path %}{{url}}index.html{% endcapture %}
{% assign_page link_data = path %}
{% assign title = link_data.title %}
{% assign description = link_data.description %}
{% endif %}
{% capture url %}{{page.url}}{{link.url}}/{% endcapture %}
{% capture path %}{{url}}index.html{% endcapture %}
{% assign_page link_data = path %}
<div>
<h2><a href="{{ site.baseurl }}{{ url }}">{{ title }}</a></h2>
<p>{{ description }}</p>
<h2><a href="{{ site.baseurl }}{{ url }}">{{ link_data.title }}</a></h2>
<p>{{ link_data.description_short | or:link_data.description }}</p>
</div>
{% endfor %}
+9
View File
@@ -0,0 +1,9 @@
module Jekyll
module ORFilter
def or(a, b)
a = a || b
end
end
end
Liquid::Template.register_filter(Jekyll::ORFilter)
+1
View File
@@ -2,6 +2,7 @@
layout: default
title: Basic Configuration
description: TinyMCE provides a wide range of configuration options that enable you to integrate it tightly with your application.
description_short: Test short desc.
---
In this introduction to TinyMCE configuration we will discuss the most important options typically used in traditional form-based layouts, along with examples of how to use TinyMCE as an inline editor (which is very useful when creating user experiences where the editing view of the page is merged with the reading view of the page.)