relative_path filter

This commit is contained in:
2022-12-15 14:39:17 -05:00
parent aa0a8e624b
commit 2500f1a626
9 changed files with 87 additions and 29 deletions

View File

@ -1,4 +1,4 @@
<article class="h-entry">
<time class="dt-published" datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate>{{ post.date | date: "%B %d" }}</time>
<a href="{{ post.url }}" class="u-url p-name">{{post.title}}</a>
<a href="{{ post.url | relative_path }}" class="u-url p-name">{{post.title}}</a>
</article>

View File

@ -1,11 +1,11 @@
<article class="h-entry prose lg:prose-lg" role="article">
<header>
<h1 class="p-name">{{ post.title }}</h1>
<time class="dt-published" datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate><a class="u-url" href="{{ post.url }}">{{ post.date | date: "%B %d, %Y" }}</a></time>
<time class="dt-published" datetime="{{ post.date | datetime | date_to_xmlschema }}" pubdate><a class="u-url" href="{{ post.url | relative_path }}">{{ post.date | date: "%B %d, %Y" }}</a></time>
</header>
{% if post.image %}
<figure class="-mx-12">
<img class="u-featured rounded-md shadow-md w-full" src="{{ post.image }}" alt="{{ post.title }}">
<img class="u-featured rounded-md shadow-md w-full" src="{{ post.image | relative_path }}" alt="{{ post.title }}">
{% if post.image_source %}
<figcaption>
<cite><a href="{{ post.image_source }}">{{ post.image_source }}</a></cite>