layout.markdown?

110 views
Skip to first unread message

StereoSteve

unread,
Mar 28, 2011, 10:45:27 PM3/28/11
to middlem...@googlegroups.com
Hello - 

I just started using Middleman.  I created a page markdown and middleman throws an error:

No such file or directory - .../views/layout.markdown


Is there a way for Markdown pages to use the layout.haml file?

Thanks,
Steve

Thomas Reynolds

unread,
Mar 28, 2011, 11:19:40 PM3/28/11
to middlem...@googlegroups.com
In the currently released version of Middleman, this is not possible.

However, the recently released version of Sinatra does add this feature. You can read about it here:

There is a prerelease branch up that builds on this new sinatra (and a newer compass/sass). If you install it:

sudo gem install middleman --pre

Then you *might* be able to use the new sinatra syntax in your config file. I haven't tested this.

set :markdown, :layout_engine => :haml, :layout => :post


-Thomas

mindreframer

unread,
May 17, 2011, 11:32:57 AM5/17/11
to middleman-users
this works, just tested it.

set :md, :layout_engine => :erb
with_layout "projects" do
page "/projects/*"
end


--> all files with .md extension will render with erb-layout.

Great stuff!
cheers,
Roman Heinrich (mindreframer)

Thomas Reynolds

unread,
May 17, 2011, 12:27:22 PM5/17/11
to middlem...@googlegroups.com
Wonderful. Hurray for Sinatra! :)

-Thomas
Reply all
Reply to author
Forward
0 new messages