Skip to content

Commit f706a74

Browse files
authored
Merge pull request #50 from justwriteclick/tags
Tags for search
2 parents 3baedf5 + 4aa1b6d commit f706a74

5 files changed

Lines changed: 15 additions & 11 deletions

File tree

assets/js/plugins/search.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ function populateResultContent(html, item) {
153153
html = injectContent(html, item.link, '##Url##');
154154
html = injectContent(html, item.excerpt, '##Excerpt##');
155155
html = injectContent(html, item.date, '##Date##');
156+
html = injectContent(html, item.tags, '##Tags##');
156157
return html;
157158
}
158159

assets/js/scripts.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"node": ">= 0.10.0"
1414
},
1515
"devDependencies": {
16-
"grunt": "~0.4.1",
16+
"grunt": "^0.4.5",
1717
"grunt-contrib-clean": "~0.5.0",
18-
"grunt-contrib-jshint": "~0.6.3",
19-
"grunt-contrib-uglify": "~0.2.2",
20-
"grunt-contrib-watch": "~0.5.2",
21-
"grunt-contrib-imagemin": "~0.2.0",
22-
"grunt-svgmin": "~0.2.0"
18+
"grunt-contrib-imagemin": "~0.5.0",
19+
"grunt-contrib-jshint": "~0.8.0",
20+
"grunt-contrib-uglify": "~0.3.2",
21+
"grunt-contrib-watch": "~0.5.3",
22+
"grunt-svgmin": "~0.3.1"
2323
},
2424
"dependencies": {
2525
"gifsicle": "^3.0.4"

search.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ sitemap: false
88
{% if forloop.index > 1 %},{% endif %}{
99
"title" : {{ post.title | jsonify }},
1010
"link" : "{{ site.url }}{{ post.url }}",
11-
"excerpt" : "{{ post.excerpt | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' }}"
11+
"excerpt" : "{{ post.excerpt | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' }}",
12+
"tags": "{{ post.tags | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' }}"
1213
}
1314
{% endif %}
1415
{% endfor %}
@@ -18,7 +19,9 @@ sitemap: false
1819
{% if forloop.index > 1 %},{% endif %}{
1920
"title" : {{ page.title | jsonify }},
2021
"link" : "{{ site.url }}{{ page.url | replace: 'index.html', '' }}",
21-
"excerpt" : "{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}"
22+
"excerpt" : "{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}",
23+
"tags": "{{ post.tags | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' }}"
24+
2225
}
2326
{%endif%}
2427
{% endfor %}

tags/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page
33
title: Tag Index
44
excerpt: "An archive of posts sorted by tag."
5-
search_omit: true
5+
search_omit: false
66
---
77

88
{% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}

0 commit comments

Comments
 (0)