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

@@ -18,11 +18,15 @@
<div class="mt-12 grid gap-5 max-w-lg mx-auto lg:grid-cols-2 xl:grid-cols-4 lg:max-w-none">
{% for person in terms %}
{% set page_path = person.path ~ 'index.md' | replace(from='-', to='_') | trim_start_matches(pat="/") %}
{% set page = get_page(path=page_path) %}
{% if page.extra.private >= 0 %}
{% include "partials/person_card.html" %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person.name) %}
{% set page = get_page(path=page_path) %}
{% if page.extra.private >= 0 %}
{% include "partials/person_card.html" %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
<hr class="mt-6" />
<p class="text-center text-sm mt-2 mb-16">