My goal is to display an image in posts using Jekyll + Github Pages. I ran into 404 error and the image did not show. My repo is at https://github.com/kuolai/blogubb. The site is at https://kuolai.github.io/blogubb. If you go to the site, you will see a kitty image at the home page. But if you go to the post Welcome to Jekyll, there is no image!!
Steps I did to create remote repo and the site:
gihub.com/newto create a remote repo- The local repo was created with
jekyll new blogubb - _config.yml with one line change `baseurl: "blogubb"
- The photo is a cute kitty stored in assets/img/kitty.png
- The only post, the default post, 2021-11-13-welcome-to-jekyll.markdown, with one line added
 git checkout -b "gh-pages"git remote add origin .../blogubb.gitgit push origin gh-pages
Other than kitty image not shown in Welcome to Jekyll post, everything looks good.
I also tried
- localhost:4000, and it worked
at home pageindex.markdown, and it workedat about pageabout.markdown, and it worked- even https://github.com/kuolai/blogubb/blob/gh-pages/_posts/2021-11-13-welcome-to-jekyll.markdown worked at repo
The error message from the console of Chrome DevTools:
GET https://kuolai.github.io/assets/img/kitty.png 404
welcome-to-jekyll.html:50
To make a minimum case, I was able to re-create the problem with minimal lines of changes. Please help.
I solved it. Replace
with
The document of Liquid Filters is in https://jekyllrb.com/docs/liquid/filters/