diff options
Diffstat (limited to 'templates/macros/create_tinysearch_json.html')
| -rw-r--r-- | templates/macros/create_tinysearch_json.html | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/templates/macros/create_tinysearch_json.html b/templates/macros/create_tinysearch_json.html deleted file mode 100644 index fcc1f5a..0000000 --- a/templates/macros/create_tinysearch_json.html +++ /dev/null @@ -1,27 +0,0 @@ -{%- macro from_section(section) -%} -{%- set section = get_section(path=section) -%} -{%- for post in section.pages -%} -{%- if not post.draft -%} -{%- set found = true -%} -{ -"title": {{ post.title | striptags | json_encode | safe }}, -"url": {{ post.permalink | json_encode | safe }}, -"meta": {% if post.summary %} - {{- post.summary | striptags | truncate(length=150) | json_encode | safe }} - {%- elif post.description %} - {{- post.description | striptags | truncate(length=150) | json_encode | safe }} - {%- elif post.content %} - {{- post.content | striptags | truncate(length=150) | json_encode | safe }} - {%- endif %}, -"body": {{ post.content | striptags | json_encode | safe }} -} -{%- if not loop.last -%},{%- endif %} -{%- endif -%} -{%- endfor -%} -{%- if found and section.subsections -%} -, -{%- for subsection in section.subsections -%} -{{ self::from_section(section=subsection) }} -{%- endfor -%} -{%- endif -%} -{%- endmacro from_section -%} |
