I'm hosting a personal site using GitHub Pages.
I'd like to reduce HTML code duplication by taking advantage of GitHub's builtin Jekyll templating functionality. For instance, putting footer.html
into a /_includes
directory for reuse on every future page.
I also happen to enjoy organising my files, so I put my 'real' index.html
inside a /html
sub-directory, along with all my other html files. GitHub pages doesn't like this, so I have used a dummy index.html
in the root directory so that the site will be loaded by GitHub.
Whenever I use:
---
---
at the top of a .html
file within my /html
directory, they rather strangely get rendered as text at the top. In fact, so do my {% includes foo.html %} calls.
Why is this happening?