I hope somebody can help -
In my Middleman project, I want the blog articles to be in a subdirectory inside /source/
(so for instance '/source/webdev/blog/).
I've followed the instructions, and muddled through (I'm new to Middleman and a complete Ruby newbie) and got the links to appear when calling: article.path
HOWEVER - the links appear as relative urls, regardless of what I set in config.rb.
I've disabled :relative_assets
(didn't seem to make any difference anyway), and I'm not using 'directory_indexes'. Any help would be immense!
My config.rb looks like this:
activate :blog do |blog|
# set options on blog
blog.permalink = "/webdev/blog/{year}/{title}.html" # but article.path ends up relative!
blog.sources = "/webdev/blog/{year}/{title}.html"
end
So my blog articles get built to /webdev/blog/2014/test-article.html
, which is what I want.
In a partial that I'm hoping to use anywhere on the site, not just the homepage:
<ul>
<% blog.articles.each do |article| %>
<li>
<%= link_to article.title, article.path %>
</li>
<% end %>
</ul>
This gives me a list of links, as expected, but with relative URLs - which means, yep, when the links list is on a page in /webdev/
, they take me to /webdev/webdev/blog/2014/some-article.html
grrrr...
What could I be doing wrong? Is there some setting in options I've missed?
Thanks in anticipation