jameshamann / jekyll-material-theme

A Jekyll Theme based on Material Design using Materialize.
MIT License
167 stars 214 forks source link

Assume leading forward slash on links #5

Closed clayrisser closed 6 years ago

clayrisser commented 6 years ago

The fix for issue #3 only surfaces on GitHub, but nonetheless, I think was still an important fix. However, the fix assumes links start with a leading forward slash. I think the config should be updated to match this.

clayrisser commented 6 years ago

Ok, I think the problem is deeper than github. It has to do with adding a baseurl. I'm still looking into a good way to fix this. My last pull request fixed it for a baseurl, but may have broken for sites without a baseurl.

jameshamann commented 6 years ago

I think I've fixed this, could be wrong, by removing the last "/" from the url in the config.yml.

6

Have a test and let me know if you come up with anything, I'll leave this open for a while until I hear back.

clayrisser commented 6 years ago

Ok, I think we're on the right track. The baseurl must end with a / or it doesn't work.

clayrisser commented 6 years ago

That doesn't make send to me though. Seems odd that the baseurl needs to end with a /.

clayrisser commented 6 years ago

Oh, I'm sorry, I was on the wrong track about ending with a /. I imported your custom website with added the {{site.baseurl}}assets. . . back into the code.

clayrisser commented 6 years ago

I hope you don't mind me using that code because it's not licensed.

clayrisser commented 6 years ago

Ok, I found the solution, we need to set the baseurl to an empty string when you're not using the baseurl

clayrisser commented 6 years ago

Or leave it empty, that works too.

clayrisser commented 6 years ago

Ah, you came to the same conclusion

jameshamann commented 6 years ago

Thanks for all the help, appreciate it!