Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 11

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!

10 Replies
Highlighted
Commander Lvl 2
Message 2 of 11

Re: why the github page doesn't show my post

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

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 3
Message 3 of 11

Re: why the github page doesn't show my 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

Copilot Lvl 2
Message 4 of 11

Re: why the github page doesn't show my post

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

Copilot Lvl 3
Message 5 of 11

Re: why the github page doesn't show my post

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

Copilot Lvl 2
Message 6 of 11

Re: why the github page doesn't show my post

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.

Moderator
Message 7 of 11

Re: why the github page doesn't show my post

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? 

Copilot Lvl 3
Message 8 of 11

Re: why the github page doesn't show my post

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.

Copilot Lvl 3
Message 9 of 11

Re: why the github page doesn't show my post

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

 

Copilot Lvl 2
Message 10 of 11

Re: why the github page doesn't show my post

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