newsroom img paths fix

This commit is contained in:
timurgordon
2022-09-01 16:30:09 +03:00
parent b84e4ea069
commit c65b9f9266
4 changed files with 4443 additions and 5 deletions

View File

@@ -62,7 +62,8 @@
</section>
</div>
<section class="post-image mx-auto w-full">
<img src="/{{page.extra.imgPath}}" />
{% set img_url = get_url(path='/' ~ page.relative_path | replace(from='_', to='-') | replace(from='index.md', to=page.extra.imgPath)) %}
<img src="{{img_url}}" />
</section>
<div class="py-12">

View File

@@ -2,7 +2,8 @@
<div class="flex-1">
<a href={{ post.permalink }} class="block">
<div class="flex-shrink-0">
<img class="h-48 w-full mx-auto object-cover" src=/{{post.extra.imgPath}} alt="" />
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="" />
</div>
<div class="flex-1 bg-white p-4 flex flex-col justify-between">