Hello,
I am very new to this, but instructions on Jekyll official website was clear enough to me to start a project to build a portfolio website, however I am facing a big issue of Jekyll not setting up or reading assets folder correctly. Could someone help me solve the mystery? What I am trying to do is set up galleries for posts and some pages. Problem is that Jekyll won’t populate the galleries with the images from assets folder, to make matters even worse, I have a navigation menu that has a logo in it, it is designed as a separate html page that layout puts together. while it all works good in pages, posts doesn’t show the logo, even though the path to the logo is correct.
So this is how my code for the gallery looks like, any hints what I am doing wrong?
---
layout: two-column
title: "Portraits of a person"
excerpt_image: assets/images/Posts-Images/portraits-or-a-person/portraits-or-a-person-HD.jpg
post thumbnail: assets/images/Posts-Images/portraits-or-a-person/portraits-or-a-person-HD.jpg
image: assets/images/Posts-Images/portraits-or-a-person/portraits-or-a-person-HD.jpg
---
test1
<div class="uk-container">
<div class="uk-grid uk-grid-match uk-grid-small uk-grid-masonry uk-lightbox">
{% for image in site.static_files %}
{% if image.path contains 'assets/images/Posts-Images/portraits-or-a-person' %}
<div class="uk-width-1-4">
<div class="uk-card uk-card-default">
<div class="uk-card-media-top">
<a href="{{ image.url }}" data-caption="{{ image.path | basename }}">
<img src="{{ image.url }}" alt="{{ image.path | basename }}" class="uk-width-1-1 lazyload" data-src="{{ image.url }}">
</a>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
it doesn’t show up, but if I view page source I see that it is populated with code that should do something.
In the front matter you can see my attempts to make post thumbnails or something to show images, that also doesn’t show up, I just see an icon that there should be an image.
it seems that Jekyll simply ignores my assets folder? can it be like that?
Do I need to make some specific changes to the config.yml? it is not much changed by me and mostly left default as whatever I try, usually breaks it all rather than helps the situation.
And this is the navigation menu code that works perfectly well for pages, but for posts, it shows a broken image link for the logo. but path to it is correct. and assets folder is generated by building. I assumed that when Jekyll creates an output, it would use this one assets folder with all content in it to populate website and posts.
<div class="uk-animation-slide-top-small"><img src="{{ site.baseurl }}assets/images/logo/Danas_Anis-imaging-nb.svg" width="150" height="230"></div>
<div class="uk-margin-medium-left">
<div class="uk-animation-slide-left-small">
<div uk-class="sidenav">
<div class="uk-margin-remove-left uk-width-1-2@s uk-width-2-3@m">
<ul class="uk-nav-primary uk-nav-parent-icon" uk-nav>
<li class="uk-active"><a href="{{ site.baseurl }}/index">Home</a></li>
<li class="uk-active"><a href="{{ site.baseurl }}/">About</a></li>
<li class="uk-active"><a href="{{ site.baseurl }}/new">New</a></li>
<li class="uk-parent">
<a href="#">Photography</a>
<ul class="uk-nav-sub">
<li><a href="#">Photo collection 1</a></li>
<li><a href="#">Photo collection 2</a></li>
</ul>
</li>
<li class="uk-parent">
<a href="#">Video</a>
<ul class="uk-nav-sub">
<li><a href="#">Video Collection 1</a></li>
<li><a href="#">Video Collection 2</a></li>
</ul>
</li>
<li class="uk-active"><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>
What am I doing wrong? I tried AI to help me and it doesn’t see issues with the code.
I am very grateful for your help.