Nested frontmatter entries for middleman-pagination

Hello,

I’m using the middleman-pagination extension and need to specify the pagination parameters through frontmatter.

At the top of my haml file (list_template.html.erb.haml), I have the following:

\---
pagination:
  for: test
  per_page: 20
\---

When I try to access this page, I get following error:

Haml::SyntaxError at /lists/8/bla
Illegal nesting: nesting within plain text is illegal.

I first tried to mark the frontmatter start and end with ‘—’ but that was not working either.

Can I specify these nested frontmatter contents in a HAML file? According to the author I should be doing this. See “Note: the for and per_page properties must be indented for the pagination frontmatter (per_page is optional).” at https://github.com/Aupajo/middleman-pagination

Thanks in advance for any help

I don’t know any frontmatter syntax with \---, only with --- on both beginning and end. As for indentation, I don’t use the pagination-extension, but in other context I use:

---
level-1:
  - level-2
  - level-2
---

Edit: I’ve looked into the middleman-pagination docs, and it doesn’t use lists (arrays), so the syntax with - is irrelevant. Are you sure that the frontmatter is parsed properly anyway? It seems as if HAML was getting it, which should not happen.