Jekyll redirects to a 404 and does not render

I want my seen at

to redirect to pages I have written in markdown

I tried implementing, post_url variable , such as documented
in order to successful redirect to a page written in markdown without success, as it points to a 404 at

[Name of Link]({% post_url 2010-07-21-name-of-post %})

Image taken from

At first I thought this was an error from the for loop, so I added the link manually as detailed in the documentation specifically for pages written in markdown.

# Index of all my content

[Library Carpentry Workshop July 2020]({% post_url 2020-07-27-library-carpentry-workshop-american-university-notes %})

  {% for post in site.posts %}
      <a href="{{ post.url }}">{{ post.title }}</a>
  {% endfor %}


theme: jekyll-theme-slate
baseurl: /Julien_Tremblay_McLellan #NO TRAILING SLASH
title: Julien Tremblay McLellan's Website
author: Julien Tremblay McLellan
description: > # this means to ignore newlines until "baseurl:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.
# social links
twitter_username: jtm-lis # DO NOT include the @ character, or else the build will fail!
github_username:  jtm-lis # DO NOT include the @ character, or else the build will fail!

show_excerpts: true # set to false to remove excerpts on the homepage

New users can only post 2 links.

What am I doing wrong?

It looks like the links that are being generated from this code are missing the repository name baseurl Julien_Tremblay_McLellan/ from the URL.

e.g. the link to your site is:

However, the URLs that are being generated look like the following:

This results in a 404 as it’s missing the repository name Julien_Tremblay_McLellan/, which is the baseurl value, from the URL.

Note that the Jekyll website mentions that you don’t need to do this as of Jekyll version 4.0. However, GitHub Pages still runs Jekyll 3.8.7 underneath so you will need to manually include the baseurl.

There are two ways you can fix this. The first—and probably the best, if this is a personal blogging website—is to turn this Pages site into a User Pages site. To do this you’ll need to rename your repository from Julien_Tremblay_McLellan to This will change your site’s URL to and these generated links should now work.

Alternatively you can modify the code to automatically include the baseurl when generating these links. The easiest way to do this would be to turn these links into a relative URL:

  {% for post in site.posts %}
      <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
  {% endfor %}

If you’re going to use the first method I’d probably recommend you also do the second too, but both should do the job!


Thank you so much @thomasshaped !! It worked.