Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jekyll pages work locally but not when online

I am trying to add a couple links to my jekyll page. Here is the code I added to my _data/links.yml file (Home was there previously, I added the last two):

- url: /
  title: Home

- url: /about
  title: About

- url: /thoughts
  title: Thoughts

It works locally but not when I host my page on github pages. I know jekyll versions are different, I have 2.0.3 locally and I'm not sure what version is on github pages. But this seems like a relatively simple thing. When I click on these links I get a 404 error.

My page is here int-A.github.io and code is hosted here. Is there something that changed in version 2 of Jekyll that would allow this to work but not on an older version (which ever is on github pages)

like image 557
intA Avatar asked Jan 02 '26 08:01

intA


1 Answers

I believe there is something wrong with permalinks and baseurl="" combination.

Your pages do render at these locations:
http://int-a.github.io/thoughts/thoughts/
http://int-a.github.io/about/about/

I believe the solution would be to set the baseurl as http://int-a.github.io and permalink to /index.html instead of /foldername/index.html

like image 90
Madhur Ahuja Avatar answered Jan 03 '26 23:01

Madhur Ahuja



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!