Skip to content
Snippets Groups Projects
Unverified Commit 62c7ac47 authored by Patrick Marsceill's avatar Patrick Marsceill
Browse files

Add done after creating content

parent 0611696c
No related branches found
No related tags found
No related merge requests found
---
---
{
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\', ' ' }}",
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% if forloop.last %}{% else %},
{% endif %}{% endfor %}
}
......@@ -4,7 +4,7 @@ namespace :search do
puts 'Creating search data json file...'
touch 'assets/js/search-data.json'
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
puts 'Done.'
puts 'Generating content...'
File.open('assets/js/search-data.json', 'w') do |f|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment