brianmaierjr / long-haul

A minimal, type-focused Jekyll theme.
http://brianmaierjr.com/long-haul
MIT License
674 stars 776 forks source link

Add baseurl property #127

Closed taylor-scafe closed 11 months ago

taylor-scafe commented 1 year ago

This addition of the base url will allow this template to be run on GitHub Pages as a project page which uses a sub directory when hosted at the default github.io/{userName}/{projectName} url.

https://mademistakes.com/mastering-jekyll/site-url-baseurl/

Not defining a base url will result in the previous functionality.

For most instances, a relative url can be used to reference within the folder structure like assets. This will prepend the baseurl to the link. For example: /assets/img/touring.jpg becomes {projectName}/assets/img/touring.jpg

For instances where the entire url is needed, prefixing the url with {{ site.url }} is replaced by using absolute_url This will prefix the url with the site url and the base url. If the base url does not exists, only the site url is added.

brianmaierjr commented 11 months ago

Thank you @taylor-scafe !