From 09597fa838ea240946a8b9c5629792517df529c8 Mon Sep 17 00:00:00 2001 From: Pontus Horn af Rantzien Date: Sun, 13 Nov 2016 22:20:01 +0100 Subject: [PATCH] Update search results example in README.md --- README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 78e798a..de679db 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,18 @@ Your template file (`search.html` in the above example) should contain something lists the pages matching the search (substitute `paged_pages` for `pages` if using Pico-Pagination): ```twig -{% if pages %} - {% for page in pages %} -
-

{{ page.title }}

- {% if page.description %}

{{ page.description }}

{% endif %} -
- {% endfor %} -{% endif %} +
+ {% if pages %} + {% for page in pages %} +
+

{{ page.title }}

+ {% if page.description %}

{{ page.description }}

{% endif %} +
+ {% endfor %} + {% else %} +

No results found.

+ {% endif %} +
``` Now, you should be able to visit for example `yoursite.com/search/foobar` (adjust path accordingly if putting search.md