Front matter stop page from being displayed

I am following this tutorial. In the project I have one file index.html placed in the root directory.

If I use the source

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
    </head>
    <body>
        <h1>"Hello World!"</h1>
    </body>
</html>

The page displays

However if I add

---
---

At the top, the page no longer displays

I must be missing something simple, but what?

you’re not doing this in the _site folder are you? that won’t work.

is there any error message in the console?

I’ve edited index.html in the root directory

.
├── 404.html
├── about.markdown
├── _config.yml
├── Gemfile
├── Gemfile.lock
├── index.html
├── index.markdown
├── _posts
│ └── 2020-05-08-welcome-to-jekyll.markdown
└── _site
├── 404.html
├── about
│ └── index.html
├── assets
│ ├── main.css
│ ├── main.css.map
│ └── minima-social-icons.svg
├── feed.xml
├── index.html
└── jekyll
└── update
└── 2020
└── 05
└── 08
└── welcome-to-jekyll.html

There are no error messages
In the browser, the ‘Hello world’ no longer appears. It just shows the default page

Solved it

I needed to remove index.markdown from the root directory (or at least clear its content). This file was create by running the

jekyll new ...

command

right - you cannot have 2 index files (or more), one will overwrite the other and you won’t know what is going on. Doesn’t matter the extension since md gets output as html.