blog image path rendering fix
This commit is contained in:
4352
static/css/index.css
4352
static/css/index.css
File diff suppressed because one or more lines are too long
@@ -52,7 +52,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="my-2 sharethis-inline-share-buttons"></div>
|
<div class="my-2 sharethis-inline-share-buttons"></div>
|
||||||
</section>
|
</section>
|
||||||
<img class="mb-8 mx-auto" src={{"/" ~ page.extra.imgPath}} alt="">
|
{% set img_url = get_url(path='/' ~ page.relative_path | replace(from='_', to='-') | replace(from='index.md', to=page.extra.imgPath)) %}
|
||||||
|
<img class="mb-8 mx-auto" src={{img_url}} alt="{{page.title ~ 'Picture'}}">
|
||||||
<div id="article">{{ page.content | safe }}</div>
|
<div id="article">{{ page.content | safe }}</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
|
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
|
||||||
<div class="flex-1 border-b">
|
<div class="flex-1 border-b">
|
||||||
<a href="{{ post.permalink }}" class="block">
|
<a href="{{ post.permalink }}" class="block">
|
||||||
|
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
<img class="h-48 w-full mx-auto object-cover" src=/{{post.extra.imgPath}} alt="" />
|
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="{{post.title ~ ' Picture'}}" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
|
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user