From 28966efff3363ecd2929d26ac024915a07cf3c8f Mon Sep 17 00:00:00 2001 From: Kilian Ciuffolo Date: Mon, 9 Nov 2015 16:05:57 -0800 Subject: [PATCH] re #51 introduces description_short for index pages --- _includes/index.html | 18 +++++------------- _plugins/or.rb | 9 +++++++++ getting-started/basic-configuration.md | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 _plugins/or.rb diff --git a/_includes/index.html b/_includes/index.html index 9a852f4..21c3214 100644 --- a/_includes/index.html +++ b/_includes/index.html @@ -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 %}
-

{{ title }}

-

{{ description }}

+

{{ link_data.title }}

+

{{ link_data.description_short | or:link_data.description }}

{% endfor %} diff --git a/_plugins/or.rb b/_plugins/or.rb new file mode 100644 index 0000000..2540382 --- /dev/null +++ b/_plugins/or.rb @@ -0,0 +1,9 @@ +module Jekyll + module ORFilter + def or(a, b) + a = a || b + end + end +end + +Liquid::Template.register_filter(Jekyll::ORFilter) diff --git a/getting-started/basic-configuration.md b/getting-started/basic-configuration.md index 5f8e32d..ad6b7b6 100644 --- a/getting-started/basic-configuration.md +++ b/getting-started/basic-configuration.md @@ -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.)