Skip to content

Commit

Permalink
fix: Fixes absolute URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Hui committed Apr 25, 2024
1 parent 3bb06fa commit 0c2def9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion _includes/gallery_component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="gallery">
{%- for media_url in include.media -%}
<div class="image_container">
<img src="{{site.url | append: " /" | append: media_url}}" class="gallery_img" decoding="async" alt="">
<img src="{{media_url | absolute_url}}" class="gallery_img" decoding="async" alt="">
</div>
{%- endfor -%}
</div>
Expand Down
12 changes: 5 additions & 7 deletions _layouts/project_gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
<h1 class="page-heading">{{ page.title }}</h1>

{{ content }}

<div class="project-gallery">
{%- for project_data in page.blurbs -%}
<div class="project-container">
<a href={{ project_data.redict }}>
<img
src="{{site.url | append: "/" | append: project_data.photo}}"
class="gallery_img"
decoding="async" alt="">
<img src="{{ project_data.photo | absolute_url }}" class="gallery_img" decoding="async"
alt="">
</a>
<div description>
<a href={{ project_data.redict }}>
Expand All @@ -27,7 +25,7 @@ <h1 class="page-heading">{{ page.title }}</h1>
</p>
</div>
</div>
{%- endfor -%}
{%- endfor -%}
</div>

<style>
Expand All @@ -49,4 +47,4 @@ <h1 class="page-heading">{{ page.title }}</h1>
height: 250px;
}
</style>
</div>
</div>

0 comments on commit 0c2def9

Please sign in to comment.