tonyynot
tonyynot

Reputation: 221

Deploying local Jekyll blog to github pages

I am having difficulty getting my Jekyll blog to display on gh pages the same way that it is displaying locally. It seems that the css and js is not loading because what I am getting is bare text/links yet the links don't work.

I have even tried deploying the _site folder directly into my host via FileZilla and I am getting the same exact problem.

Upvotes: 0

Views: 101

Answers (1)

David Jacquel
David Jacquel

Reputation: 52779

Your site is hosted at yourname.github.io/repositoryname ?

In _config.yml, simply set baseurl: /repositoryname.

Call assets like this :

<link rel="stylesheet" href="{{ "/css/style.css" | prepend: site.baseurl }}">

or

<script src="{{site.baseurl}}/assets/js/scripts.js"></script>

Upvotes: 2

Related Questions