Search code examples
eleventy

Why eleventy front matter in index.md goes into index.html


I try to go through Eleventy Guide and stuck on step "Render Your First Page".

Project structure:
enter image description here

package.json
enter image description here

.eleventy.js

enter image description here

index.md

enter image description here

_includes/page.njk

enter image description here

I start eleventy with npx eleventy --serve

enter image description here

and get build/index.html:

enter image description here

In browser: enter image description here

What did I do wrong?


Solution

  • I don't know what the bug is about, but I resolved it. If I copy/past front matter from this article:

    ‐‐‐
    title: 11ty starter site
    description: This is a demonstration website generated using the 11ty static site generator.
    layout: page.njk
    ‐‐‐
    

    it don't have any syntax highlighting: enter image description here

    But when I clear index.md front matter and write it by yourself, it looks different, it has syntax highlighting now.

    enter image description here

    I think problem is --- symbols. It looks the same, but it's no 🤯 enter image description here