Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

Jekyll Theme Not Showing for _posts

Solved! Go to Solution.

Sorry for the very basic question, I have spent a considerable amount of time trying to understand this.

 

I have applied a Jekyll theme to my page and that works great, however, when I added a `_posts` directory to nest my posts, the theme isn't carrying through and it's just black on white with (huge) images.

 

https://github.com/huntops-blue/huntops-blue.github.io

 

Steps tried so far:

 

Again, I feel like I'm following the documentation, so I think it's got to be something obnoxiously simple. 

 

The only other variable is that the site is being served up as another domain (https://huntops.blue) vs. [page].github.io, but that's all working with the theme for `index.md`, it's just the `_posts` theme that isn't working.

1 Reply
Highlighted
Solution
Copilot Lvl 2
Message 2 of 2

Re: Jekyll Theme Not Showing for _posts

Circling back on this, I got it.

 

I'm not sure exactly what the issue was, but I assume that the "apply theme" section of Github provides a pretty basic Jekyll theme without all the bells and whistles, which I guess _posts requires?

 

So what I did was clone the theme directly from their Github repo, https://github.com/pages-themes/midnight, in my case and then ran the instructions to serve it up locally on my system:

Clone down the theme's repository (git clone https://github.com/pages-themes/midnight)
cd into the theme's directory
Run script/bootstrap to install the necessary dependencies
Run bundle exec jekyll serve to start the preview server
Visit localhost:4000 in your browser to preview the theme

From there, I just slowly replaced things from my site where they should go - index.md, _config.yml, created _posts directories, added images directories, replicated the Front Matter that they had...mainly just left everything alone that wasn't specific to my content. I think the main issue was the inclusion of _sass, script, Gemfile, and Gemfile.lock. Lots of trial and error, but I got there.

 

Having those there seem to do whatever magic they do and it worked out for me.