middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
326 stars 179 forks source link

Blog not Building #324

Closed iwarner closed 7 years ago

iwarner commented 7 years ago

Hiya

using the following config :

# Blog : Blog from Google
# @see https://elenichappen.svbtle.com/getting-tags-to-work-with-middlemans-blog-gem
activate :blog do | blog |

    blog.name              = "blog"
    blog.default_extension = ".haml"

    blog.permalink         = "{category}/{title}.html"
    blog.sources           = "blog/:id.html"

    blog.layout            = "articleTwo"
    blog.summary_separator = /(READMORE)/
    blog.summary_length    = 250

    blog.calendar_template = "template/blog-calendar/blog-calendar.html"
    blog.year_link         = "/calendar/:year.html"
    blog.month_link        = "/calendar/:year/:month.html"
    blog.day_link          = "/calendar/:year/:month/:day.html"

    blog.tag_template      = "template/blog-tag/blog-tag.html"
    blog.taglink           = "/tag/:tag.html"

    blog.paginate          = true
    blog.per_page          = 5
    blog.page_link         = "page/{num}"

end

The frontmatter of the blog has the ID

---

id: 1rs4H2-80A0BRO03G6ZbprGefbTwCVfg0x2VPGnjm1MM

However nothing is built with this structure - is something protected with what I am trying to do?

lbain commented 7 years ago

Hi @iwarner, I believe I experience the same issue earlier today https://github.com/middleman/middleman-blog/issues/327 I resolved it by converting my layout files from .haml to .erb. I'm not sure what's going on here, but it seems middleman-blog is having difficulties with Haml layouts (see also https://github.com/middleman/middleman-blog/issues/322). Hope that helps you!

corroded commented 7 years ago

i feel so bad now :( I used middleman because it supported HAML out of the box but apparently it fails? sigh

oh well. I've been trying to investigate this every couple of days or so but I don't think I can manage to pinpoint why it would fail in HAML but not in ERB

lbain commented 7 years ago

@corroded My setup worked with some files in Haml as long as the layouts were in ERB. Even the partials I used in my layouts are in Haml without issue. It seems that only the blog and parent layouts need to be ERB files. Hopefully that helps your situation :)

iwarner commented 7 years ago

I think the issue I found was that there is already an ID generated internally

I went to

http://localhost:4567/__middleman

to examine the structure and noticed this - removing the ID from the frontmatter of the templates seemed to solve the problem

my templates still have the extension .html.haml

hope that helps