Jekyll with a broken front, how to find a broken file?

When I make a syntax error in the first question, I get the following error:

 /.../psych.rb:203:in `parse': (<unknown>): could not find expected
 ':' while scanning a simple key at line 6 column 1
 (Psych::SyntaxError)
        from /.../psych.rb:203:in `parse_stream'
        from /.../psych.rb:151:in `parse'
            from ....

Do you know how to determine which file caused the problem?

I know that I could probably use DTrace as follows:

dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'| grep _posts

But I'm looking for something more direct.

+5
source share
2 answers

it seams that jekyll does not work well on ruby ​​1.9.3. A more restrictive yaml: Psych parser was introduced, which probably has a different hierarchy of exceptions, and there jekyll is not handled correctly for it.

+4
source

You may find that this is due to incorrect formatting.

If your front question is as follows:

---
menu:
- text: Home
url: /en/index.html
- text: Overview
url: /en/overview.html
---

instead

---
menu:
- text: Home
  url: /en/index.html
- text: Overview
  url: /en/overview.html
---

then the YAML parser will throw it out.

+3
source

All Articles