Hi,
I’m new to Middleman and am having trouble getting my blog detail page to pull in the stylesheet. When I click on the blog title (from the blog listing page) and go to the full article it just has unstyled body text. Any help would be much appreciated!
Thanks,
R.S.
I created this layout: article_layout.erb
<% wrap_layout :layout do %>
<header>My Name</header>
<body class="no-bg-body">
<article>
<%= yield %>
</article>
</body>
Here is stylesheet for header & body : all.css.scss
header {
background-color: #5199ce;
color: #fff;
font-family: ‘Raleway’, sans-serif;
font-size: 30px;
height: 60px;
width: 100%;
padding-left: 50px;
padding-top: 10px;
}
body {
font-family: sans-serif;
background: url("…/images/sdbg.jpg");
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.no-bg-body {
background: url("#");
background-color: #fff;
}
Here is config.rb:
activate :blog do |blog|
blog.layout = "article_layout"
end
page "blog/*", :layout => :article_layout
Sample article:
2015-08-08-sample-article-name.html.erb
--- title: Sample article name date: 2015-08-08 15:50 UTC layout: article_layout
—
Lorem ipsum dolor sit amet, deseruisse vituperatoribus mea at, timeam delectus corrumpit no duo. Sed mentitum expetenda referrentur ad. Agam feugiat ocurreret et sea, paulo offendit vulputate ut nam.