mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Use unless
loop for comma
and mention `search_exclude`
This commit is contained in:
@@ -12,13 +12,13 @@ namespace :search do
|
||||
f.puts '---
|
||||
---
|
||||
{
|
||||
{% for page in site.html_pages %}"{{ forloop.index0 }}": {
|
||||
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
|
||||
"id": "{{ forloop.index0 }}",
|
||||
"title": "{{ page.title | xml_escape }}",
|
||||
"content": "'+content+'",
|
||||
"url": "{{ page.url | absolute_url | xml_escape }}",
|
||||
"relUrl": "{{ page.url | xml_escape }}"
|
||||
}{% if forloop.last %}{% else %},
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endif %}{% endfor %}
|
||||
}'
|
||||
end
|
||||
|
Reference in New Issue
Block a user