Add Testimonials page

This commit is contained in:
Oliver Davies 2024-01-15 18:10:58 +00:00
parent fc3e30eddd
commit 0b8d7147d6
2 changed files with 12 additions and 2 deletions

View file

@ -1,13 +1,15 @@
{% set limit = limit ?? 10 %}
{% set offset = offset ?? 0 %}
{% set testimonials = site.testimonials %}
{% if tag is not null %}
{% set testimonials = testimonials|filter(testimonial => tag in testimonial.tags) %}
{% endif %}
{% set testimonials = testimonials|slice(offset, limit) %}
{% if limit > 0 %}
{% set testimonials = testimonials|slice(offset, limit) %}
{% endif %}
<section>
<h2 class="text-xl font-bold">{{ title|default('Testimonials') }}</h2>

View file

@ -0,0 +1,8 @@
---
title: Testimonials
---
{% include 'testimonials' with {
limit: 0,
title: 'All Testimonials',
} %}