{% set post_limit = config.extra.homepage_post_limit | default(value=3) %}
- {% for page in section.pages | slice(end=post_limit) %} {% include "partials/post-card.html" %} {% endfor %}
+ {% for page in section.pages[:post_limit] %} {{
}} {% endfor %}
diff --git a/templates/page.html b/templates/page.html
index 0ba140d..f93e95c 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -8,12 +8,12 @@
{% block og_title %}{{ page.title }}{% endblock og_title %}
{% block og_description %}{{ page.description | default(value=config.description) }}{% endblock og_description %}
{% block og_url %}{{ page.permalink }}{% endblock og_url %}
-{% block og_type %}{% if page.ancestors is containing("posts/_index.md") %}article{% else %}website{% endif %}{% endblock og_type %}
+{% block og_type %}{% if "posts/_index.md" in page.ancestors %}article{% else %}website{% endif %}{% endblock og_type %}
{% block og_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock og_image %}
{% block og_extra %}
- {% if page.ancestors is containing("posts/_index.md") %}
- {% if page.date %}{% endif %}
- {% if page.updated %}{% endif %}
+ {% if "posts/_index.md" in page.ancestors %}
+ {% if page.date %}{% endif %}
+ {% if page.updated %}{% endif %}
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
@@ -29,7 +29,7 @@
{% block twitter_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock twitter_image %}
{% block head %}
- {% if page.ancestors is containing("posts/_index.md") %}
+ {% if "posts/_index.md" in page.ancestors %}
+{% endcomponent youtube %}
diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html
index 2954d35..cb81d13 100644
--- a/templates/taxonomy_single.html
+++ b/templates/taxonomy_single.html
@@ -32,8 +32,8 @@ term.permalink }}{% endblock og_url %} {% block head %}
"@type": "Person",
"@id": "{{ config.base_url | safe }}/#author"
}
- {% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %}
- {% if page.updated %},"dateModified": "{{ page.updated | date(format="%+") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%+") }}"{% endif %}
+ {% if page.date %},"datePublished": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %}
+ {% if page.updated %},"dateModified": "{{ page.updated | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %}
}{% if not loop.last %},{% endif %}
{% endfor %}
]