mirror of
https://github.com/thangisme/notes.git
synced 2025-02-21 06:57:46 -05:00
Add done after creating content
This commit is contained in:
parent
0611696c2d
commit
62c7ac4729
12
assets/js/search-data.json
Normal file
12
assets/js/search-data.json
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
---
|
||||
{
|
||||
{% 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|
|
||||
|
Loading…
x
Reference in New Issue
Block a user