LeNPaul / Lagrange

A minimalist Jekyll theme for running a personal blog powered by Jekyll and GitHub Pages
https://lenpaul.github.io/Lagrange/
MIT License
682 stars 661 forks source link

Local testing with Jekyll is using wrong url parsing #67

Open chmendoza opened 5 years ago

chmendoza commented 5 years ago

Hi,

I a getting bad rendering and broken links on local testing with bundle exec jekyll serve. The rendering on Github Pages is great. I believe the problem might reside in lines like this one:

https://github.com/LeNPaul/Lagrange/blob/19a43cf5d2c79595324e9c6be94192288c8d39b8/_includes/head.html#L14

What should I do? Thanks!

chmendoza commented 5 years ago

I solved! I replace site.github.url with the filter absolute_url, as suggested here:

https://jekyllrb.com/docs/github-pages/#project-page-url-structure

chmendoza commented 5 years ago

Now I screw rendering on Github Pages. I changed to relative_url just for the css files. It's weird that I can use the full path of an image under /assets/img/ but for the css files it has to be a relative path. That fixed the issue. Now with local testing and rendering on Github Pages!! Thanks!