Jekyll Theme Not Showing for _posts

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:

  • I have duplicated default.htlm as posts.html in the _layouts 
  • Tried using layout: default and/or layout: post for a few of the posts - ex: 1 and 2
  • Added base.url to the _config.yml file
  • Tried ![_config.yml]({{ site.baseurl }}/config.yml) in one of the files 1
  • Read Barry Clark’s post on standing up a Jekyll page
  • Read Jekyll’s documentation on posts

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.

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.