aboutsummaryrefslogtreecommitdiff
path: root/templates/macros/create_tinysearch_json.html
diff options
context:
space:
mode:
authorJieiku2024-08-07 14:16:53 -0700
committerJieiku2024-08-07 14:16:53 -0700
commit126c4c9c914c178a9dbb682e6845ee0b51902797 (patch)
tree9e6fb03d7cfaeb7d7f11cb7335cabe6fc028f87d /templates/macros/create_tinysearch_json.html
parentdcfd66a2f8ef4d1777deaaabed94d90c9e247dc8 (diff)
downloadabridge-126c4c9c914c178a9dbb682e6845ee0b51902797.tar.gz
abridge-126c4c9c914c178a9dbb682e6845ee0b51902797.tar.bz2
abridge-126c4c9c914c178a9dbb682e6845ee0b51902797.zip
node script cleanup
Diffstat (limited to 'templates/macros/create_tinysearch_json.html')
-rw-r--r--templates/macros/create_tinysearch_json.html27
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 -%}