mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Fix pathing issues with gh-pages
This commit is contained in:
@@ -2,10 +2,12 @@ namespace :search do
|
||||
desc 'Generate the files needed for search functionality'
|
||||
task :init do
|
||||
puts 'Creating search data json file...'
|
||||
touch '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: '\\', ' ' }}]
|
||||
|
||||
File.open('search-data.json', 'w') do |f|
|
||||
puts 'Generating content...'
|
||||
|
||||
File.open('assets/js/search-data.json', 'w') do |f|
|
||||
f.puts '---
|
||||
---
|
||||
{
|
||||
@@ -18,5 +20,6 @@ namespace :search do
|
||||
{% endif %}{% endfor %}
|
||||
}'
|
||||
end
|
||||
puts 'Done.'
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user