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

@@ -2,7 +2,11 @@
{% block content %}
{% set page_path = term.path ~ 'index.md' | replace(from='-', to='_') | trim_start_matches(pat="/") %}
{% set page = get_page(path=page_path) %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(term.name) %}
{% set page = get_page(path=page_path) %}
<div class="container sm:pxi-0 lg:w-5/6 mx-auto min-h-screen overflow-x-hidden pt-24">
<div class="flex flex-row flex-wrap items-start mx-4 sm:mx-0">
@@ -47,5 +51,6 @@
<hr/>
</div>
</div>
{% endif %}
{% endblock content %}