From abf886b1047524b05fb16863100ca7a07b271518 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 30 Nov 2013 18:02:27 +0100 Subject: [PATCH] full content search --- Gruntfile.js | 1 + _src/search.json | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 65ad7c1c..f101653f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -166,6 +166,7 @@ module.exports = function(grunt){ files: [ '<%= config.src %>/*.html', '<%= config.src %>/*.xml', + '<%= config.src %>/*.json', '<%= config.src %>/_includes/**', '<%= config.src %>/_layouts/**', '<%= config.src %>/_posts/**', diff --git a/_src/search.json b/_src/search.json index 5af325b3..bee90d8b 100644 --- a/_src/search.json +++ b/_src/search.json @@ -3,10 +3,11 @@ [ {% for post in site.posts %} { - "title" : "{{ post.title | escape }}", - "category" : "{{ post.category }}", - "url" : "{{ post.url }}", - "date" : "{{ post.date }}" + "title" : "{{ post.title | escape }}", + "category" : "{{ post.categories }}", + "url" : "{{ post.url }}", + "date" : "{{ post.date }}", + "content" : "{{ post.content | strip_html | strip_newlines | escape }}" } {% if forloop.last %}{% else %},{% endif %} {% endfor %} ] \ No newline at end of file