Converting Markdown file without Front Matter

Is there any way how jekyll would convert .md (markdown) files automatically, without installing and using the jekyll-optional-front-matter plugin?

The weird thing is that I have one local site where this just happens: I have a bunch of .md files and jekyll serves them fine, but none of the files has a front matter section. I am really puzzled why that works. I thought it shouldn’t should it?

This is the site where this happens: https://gatenlp.github.io/gateplugin-LearningFramework/

If you add the .md extension to any of the non-directory URLs, or index.md to the directory URLs, you will see the original markdown file and that none of these files contains any YAML front matter.

1 Like

GitHub Pages using jekyll-optional-front-matter as a dependency. It’s loaded automatically, so that explains why having .md files without front matter work on your GitHub Pages hosted site.

1 Like

Also if the .md files aren’t working and they’re outside of normal Jekyll folders you’ll need to add them via the include array in your _config.yml file.

2 Likes

Ahh thanks that totally explains it! The other dependencies looks quite useful as well.

Is there any drawback of using the github-pages plugin for a site even if the site is not hosted on github?

1 Like

Only drawback would be if you want the bleeding edge version of Jekyll and/or need to use 3rd party plugins GH-pages doesn’t whitelist.

Though if you’re self-hosting I’d say go with Jekyll gem and add the plugins GH-pages uses in your Gemfile.

2 Likes