1
votes

My _config.yml is defined thus

# Site settings 
title: XTargets 
email: [email protected] 
description: "XTargets - Technical blog of Brad Phelan" 
baseurl: "/xtargets" 
url: "http://xtargets.com" 

# Build settings 
markdown: redcarpet 
permalink: pretty 

defaults: 
  - 
    scope: 
      path: "" 
    values: 
      layout: "post" 

https://github.com/bradphelan/xtargets/blob/gh-pages/_config.yml

and when I run the jekyll server locally my posts get wrapped with the post layout. However when checked into gh-pages branch on github the pages are not wrapped.

See

http://bradphelan.github.io/xtargets/2012/03/29/simple-javascript-powered-inline-confirm/

Why would this occur?

2
Could you show us a minimal (not) working example? Your actual example don't show the problem, because the layout is provided in the posts (and baseurl is not).Sylvain
GitHub Pages now runs Jekyll 2.2.0, so this should no longer be an issue.Nick McCurdy

2 Answers

2
votes

It looks like github pages has not yet updated jekyll version. pages.github.com/versions/. It's at jekyll version 1.5.1 currently.

1
votes

This issue is not related to Front Matter defaults or GitHub Pages not running the latest Jekyll version. It's your stylesheet not being linked correctly.

Your site looks for the CSS file in http://bradphelan.github.io/css/main.css, but it is located here: http://bradphelan.github.io/xtargets/css/main.css

In head.html, change this accordingly:

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