Using existing .html page as .md page

Hi Community,

After searching the internet a lot, I can’t seem to find an answer to my question, so I decided to post it here.

I have an old website that I want to update and make easier to maintain by switching to a Jekyll based website. However, some of my pages are actually fine and I just want to copy them on my Jekyll website.

How do I do this? I have added my xxx.html file to my _layouts directory. I then have made a markdown file in _pages in which I set layout: xxx

However, I keep on getting a 404 error. Any pointers on how to do this?

Many thanks in advance!

you should just be able to copy xxx.html into the root directory of your new site, then go to http://mysite/xxx.html - is that what you’re looking for? or do you have the content and the layout separate on the old site and need to port those elements over to the new site?

The answer above is correct.

The simplest approach is this at the root. No Jekyll stuff in it.


Note that Github Pages will make the site available like this immediately

But it can take a few minutes on the first deploy to have this available and not give a 404.

Or can choose to have instead. And you can also add a layout file to tha (regardless of whether your page is .md or .html).

Regarding structure of your site…

See if you can get an existing pattern to work from a template project or tutorial then modify from there for your needs.

Here is a simple project I made with one page and no layout.

You could disable the theme in the config and create and use a layout file.

Or, here is a fuller example which uses no theme but makes use of layout files