why the github page doesn't show my post

I create a dic called “_posts” and add a file in it, the name is correct but I can’t see that in my github pages.

my file:https://github.com/yeyypp/Blog/blob/master/_posts/2019-06-17-RBTree.md

my github page:https://yeyypp.github.io/Blog/

Thanks!

I would guess it’s because you have no link from your index.md file to the .md file of your post.

Thanks for replying! I don’t know how to fix the index.md, I just follow the github course in the github learning lab.

After I finish that, it doesn’t show my post too.

The course is here : https://lab.github.com/githubtraining/github-pages

Hi @yeyypp! It looks like you’ve made some changes, and now there’s a different file there.

Just to be sure, if you go to the Settings tab and scroll down, GitHub Pages is enabled, correct? 

hi!

Thanks for replying, I just turn off the github page feature , because I found the post doesn’t show  in the course about github page in the github learning lab, and someone told me that I need add some html code to my index.md so that it could work.

I took the course and have 3 post files in the _posts directory and they do not show up 

the course does not direct you to create a link to the file, please advise the code needed to link the file so that the blog shows correctly.

with this I would assume that in future posts I would need to edit the index file to add my post which seems counter intuitive to a blog, I would think putting properly formatted filenames in the _posts directory should make them appear automatically.

thanks

Marc

1 Like

same problem here, hope the gitpage course could add something about that.

Hi

There is someone has the same problem.

I took the course and have 3 post files in the _posts directory and they do not show up 

the course does not direct you to create a link to the file, please advise the code needed to link the file so that the blog shows correctly.

with this I would assume that in future posts I would need to edit the index file to add my post which seems counter intuitive to a blog, I would think putting properly formatted filenames in the _posts directory should make them appear automatically.

thanks

Marc

Thanks

further analysis seems to point to the lab using .md (markdown) file extension vs .MARKUP or .html

I have tried using some more advanced jekyll to work with this and what has happened is now I have the posts showing up on the index page of the site but the link is not clickable … I have tried .md, .MARKUP, and .html

none seem to make the post render.

I just did the course as well and have the same problem…  it turns out that the posts are not automatically listed.

Here is what I added as per the article on https://stackoverflow.com/questions/46026564/github-pages-post-links-not-working

In the index.md file

<ul>
  {% for post in site.posts %}
    <li>
      <a href="/github-pages-with-jekyll{{ post.url }}">{{ post.title }}</a>
    </li>
  {% endfor %}
</ul>

NB:  the course uses a subdirectory so you need to prepend {{ post.url }} with the directory name you are using.

Hope this helps

1 Like

Hi @yeyypp  and many others!

Thank you for taking the time to inform us of the _posts issue occurring in this course. We have been looking into it and have pushed up a change that now allows the posts to be displayed on the homepage. We were using a jekyll theme that didn’t handle posts as instructed in the course steps, and for this we apologize for the inconvenience. 

For the fix, we made a change to the instructed theme but are currently evaluating several other themes and slight modifications to the course steps/logic to improve the end-of-course deliverable. 

From here, there are several options you can take to remedy your existing repository.

  • You can change the theme in your _config.yml file to read theme: minima and that will update your GitHub Pages site with a theme that will display your posts.
  • You can keep the existing theme and add some liquid formatting to your index.html file that will display your posts, as @williamdewitt suggested. 
  • You can re-join the course with the updated theme and instructions. 

Thank you for your patience - hopefully this helps. Let us know if there are any remaining issues.

2 Likes