From e61b737b02f32ab879c3f0b200508b4204623982 Mon Sep 17 00:00:00 2001 From: Luke Kysow Date: Thu, 14 Jul 2016 13:17:03 -0700 Subject: [PATCH 1/4] Fix unclosed
tag bug Previously, if you didn't include a caption, the `
` tag would never be closed. Just needed to move the `{% endif %}` --- _includes/image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/image.html b/_includes/image.html index ad12972..7b3b0fa 100644 --- a/_includes/image.html +++ b/_includes/image.html @@ -1 +1 @@ -
{% if {{include.url}} %}{% endif %}{{include.alt}}{% if {{include.url}} %}{% endif %}{% if {{include.caption}} %}
{{include.caption}}
{% endif %} +
{% if {{include.url}} %}{% endif %}{{include.alt}}{% if {{include.url}} %}{% endif %}{% if {{include.caption}} %}
{{include.caption}}
{% endif %}
From 4765c5442fafef5167c1b7c9169cb772b582f167 Mon Sep 17 00:00:00 2001 From: Luke Kysow Date: Mon, 12 Sep 2016 16:56:57 -0700 Subject: [PATCH 2/4] Use actual tab character in replace for search The `^t` wasn't working but an actual tab did --- pages/mydoc/mydoc_search_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/mydoc/mydoc_search_configuration.md b/pages/mydoc/mydoc_search_configuration.md index 99a512e..0107493 100644 --- a/pages/mydoc/mydoc_search_configuration.md +++ b/pages/mydoc/mydoc_search_configuration.md @@ -35,7 +35,7 @@ I've found that include the `body` field in the search creates too many problems {% raw %} ```json - "body": "{{ page.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' | replace: '^t', ' ' }}", + "body": "{{ page.content | strip_html | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' | replace: ' ', ' ' }}", ``` {% endraw %} From 64aaa7796dbff7640864a117c1cea89897b8858a Mon Sep 17 00:00:00 2001 From: Rand McKinney Date: Fri, 23 Sep 2016 14:57:43 -0700 Subject: [PATCH 3/4] Update mydoc_icons.md Put in missing end tag. --- pages/mydoc/mydoc_icons.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/mydoc/mydoc_icons.md b/pages/mydoc/mydoc_icons.md index 8fc4dca..dcb1fb6 100644 --- a/pages/mydoc/mydoc_icons.md +++ b/pages/mydoc/mydoc_icons.md @@ -199,13 +199,13 @@ And here's the shortcode: {% raw %} ``` -{{site.data.alerts.callout_info}This is a special callout information message. +{{site.data.alerts.callout_info}This is a special callout information message.{{site.data.alerts.end}} {% endraw %} ``` Here's the result: -{{site.data.alerts.callout_info}}This is a special callout information message. +{{site.data.alerts.callout_info}}This is a special callout information message.{{site.data.alerts.end}} You can use any of the following: {% raw %} From 5181f8ab4c2eec68384995fdde22109d2a1815e4 Mon Sep 17 00:00:00 2001 From: atomicules Date: Mon, 7 Nov 2016 22:44:31 +0000 Subject: [PATCH 4/4] unless forloop for comma was missing from site.pages in search.json If the site has only pages this results in invalid json as there will be a trailing comma. --- search.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/search.json b/search.json index 348c498..b61ffb7 100644 --- a/search.json +++ b/search.json @@ -13,7 +13,8 @@ search: exclude "keywords": "{{page.keywords}}", "url": "{{ page.url | remove: "/"}}", "summary": "{{page.summary | strip }}" -}, +} +{% unless forloop.last and site.posts.size < 1 %},{% endunless %} {% endunless %} {% endfor %} @@ -29,4 +30,4 @@ search: exclude {% unless forloop.last %},{% endunless %} {% endfor %} -] \ No newline at end of file +]