From 342d5a425054cfba494d584fdf44b29efe5690f3 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Thu, 28 Apr 2016 18:26:44 -0700 Subject: [PATCH] site: optimize liquid for whitespace removal --- site/_includes/docs_option.html | 12 +++--------- site/_includes/docs_ul.html | 16 +++------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/site/_includes/docs_option.html b/site/_includes/docs_option.html index c2593971..e7afcc88 100644 --- a/site/_includes/docs_option.html +++ b/site/_includes/docs_option.html @@ -1,11 +1,5 @@ -{% assign items = include.items %} - -{% for item in items %} +{% for item in include.items %} {% assign item_url = item | prepend:"/docs/" | append:"/" %} - - {% for p in site.docs %} - {% if p.url == item_url %} - - {% endif %} - {% endfor %} + {% assign doc = site.docs | where: "url", item_url | first %} + {% endfor %} diff --git a/site/_includes/docs_ul.html b/site/_includes/docs_ul.html index 34b6278a..7688328f 100644 --- a/site/_includes/docs_ul.html +++ b/site/_includes/docs_ul.html @@ -1,17 +1,7 @@ -{% assign items = include.items %} -