feat: add reusable macros
This commit is contained in:
parent
a8555c4e89
commit
28baa94b93
5 changed files with 20 additions and 21 deletions
5
src/_includes/macros/date.njk
Normal file
5
src/_includes/macros/date.njk
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% macro format(dateString) %}
|
||||
<time class="[ date ] [ flex items-center gap-0.5 my-1 ]" datetime="{{ date }}">
|
||||
{% include "svgs/calendar.svg" %}{{ dateString | formatDate("MMMM Do YYYY") }}
|
||||
</time>
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue