Reputation:
I am trying to deploy a jekyll site for my personal website, under a "blog" folder. When I try to link a css to default.html Jekyll is looking for css file under blog/css folder, however my css files are located at blog/../css i.e on my main "website" folder which contains, "blog" folder, "css" folder etc. Is there a way I can link my jekyll site to the css files on the base folder without having to move the config.yml file. I tried changing the baseurl to ../blog but it didnt work.
Upvotes: 0
Views: 131
Reputation: 621
The easiest way to accomplish what you're looking for is to symlink blog/../css
to blog/css
Jekyll will pull the css files through the symlink when generating the site.
One thing to note: when doing jekyll serve
, vanilla Jekyll will not regenerate based on changes to symlinked files. (There is a plugin to do this, but for a personal site, that's overkill: just stop jekyll serve
and restart)
Depending on the theme, you can also modify the header (typically _includes/head.html
) to have your manually specified css file.
Upvotes: 0
Reputation: 52829
If your css are at the root of your repository, from blog folder, you just have to link with :
<link rel="stylesheet" href="/css/main.css">
Upvotes: 0