From 126c4c9c914c178a9dbb682e6845ee0b51902797 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Wed, 7 Aug 2024 14:16:53 -0700 Subject: node script cleanup --- templates/macros/create_tinysearch_json.html | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 templates/macros/create_tinysearch_json.html (limited to 'templates/macros/create_tinysearch_json.html') 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 -%} -- cgit v1.3.1