improve formatting script and handle formatting errors

This commit is contained in:
timurgordon
2022-09-09 12:39:28 +03:00
parent 4d7cdb6088
commit a24107cbb8
9 changed files with 85 additions and 30 deletions

View File

@@ -1,3 +1,14 @@
<!-- Takes the path of a page and checks if it exists
- if exists sets the page
-->
{% macro get_if_exists(path, type="text") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person.name) %}
{% set page = get_page(path=page_path) %}
{% endif %}
{{ page }}
{% endmacro get_if_exists %}
{% macro page_list(type="text") %}
<div id="list"></div>
{% if section.extra.group_pages_by %}