mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-17 00:22:24 -06: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...'
|
puts 'Creating search data json file...'
|
||||||
touch 'assets/js/search-data.json'
|
touch 'assets/js/search-data.json'
|
||||||
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
|
content = %Q[{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | strip_newlines | replace: '\\', ' ' }}]
|
||||||
|
puts 'Done.'
|
||||||
puts 'Generating content...'
|
puts 'Generating content...'
|
||||||
|
|
||||||
File.open('assets/js/search-data.json', 'w') do |f|
|
File.open('assets/js/search-data.json', 'w') do |f|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user