Reputation: 350
I've created a new Jekyll page, including the appropriate YAML Front Matter info at the top. My problem is that the page is being rendered without any styles. Upon inspection I see the head tag is empty so the CSS isn't linking. I'm sure I'm missing something painfully obvious but I'm stumped. I see that the style sheet is linked to the index page, just not my new page and I don't know what I'm missing to include the head data that links to my style sheet. Here's what I have in my new page.
---
layout: default
title: New Site
---
<div>
<div>
<h2>
<a href="test.html">Our Sweet Test Page</a>
</h2>
<section>
<article class="dope-page">
<h1>Test Headline</h1>
</article>
</section>
</div>
</div>
Upvotes: 1
Views: 318
Reputation: 2637
In my point of view, Jekyll render the page alongside index.html
using layout
parameter and find the layout in the _layouts
folder. In your case, you use layout: default
so you should check the _layouts/default.html
file.
The default.html
file generated by jekyll new your_awesome_site
should look like below:
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div class="page-content">
<div class="wrapper">
{{ content }}
</div>
</div>
{% include footer.html %}
</body>
</html>
And the css files are in _includes/head.html
.
Upvotes: 1
Reputation: 12582
This is exactly what happens when your template is not loaded. Is there a default.html file in your _layouts directory with a link to the stylesheet?
Upvotes: 1