diff options
| author | Jieiku | 2022-08-14 12:41:15 -0700 |
|---|---|---|
| committer | Jieiku | 2022-08-14 12:41:15 -0700 |
| commit | 830cabab1f638052a8c4ac39eb86370da5a676eb (patch) | |
| tree | f59bc6914105256ea684066277a49ab2dce53300 /templates/macros/create_stork_toml.html | |
| parent | cf95ee520261a0a523d5a3dfbc01a3847d67de51 (diff) | |
| download | abridge-830cabab1f638052a8c4ac39eb86370da5a676eb.tar.gz abridge-830cabab1f638052a8c4ac39eb86370da5a676eb.tar.bz2 abridge-830cabab1f638052a8c4ac39eb86370da5a676eb.zip | |
Alternate Search Libraries Tinysearch and Stork1.2.0
Diffstat (limited to 'templates/macros/create_stork_toml.html')
| -rw-r--r-- | templates/macros/create_stork_toml.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/macros/create_stork_toml.html b/templates/macros/create_stork_toml.html new file mode 100644 index 0000000..c9ed35c --- /dev/null +++ b/templates/macros/create_stork_toml.html @@ -0,0 +1,19 @@ +{# cargo install stork-search --locked #} +{# cd .dev/abridge #} +{# zola build #} +{# /home/jieiku/.cargo/bin/stork build --input public/data_stork/index.html --output static/stork.st #} + +{%- macro from_section(section) -%} +{%- set section = get_section(path=section) -%} +{%- for post in section.pages -%} +{%- if not post.draft %} {path = {{ '.' ~ post.path ~ 'index.html' | json_encode | safe }}, url = {{ post.permalink | json_encode | safe }}, title = {{ post.title | striptags | json_encode | safe }}} +{%- if not loop.last -%}, +{% endif -%} +{%- endif -%} +{%- endfor -%} +{%- if section.subsections -%}, +{% for subsection in section.subsections -%} +{{ self::from_section(section=subsection) }} +{%- endfor -%} +{%- endif -%} +{%- endmacro from_section -%}
\ No newline at end of file |
