Writing a 404 Page for Octopress Github

If you have Octopress Github here is how to write a custom 404 page.

Why?

I recently moved from Posterous. They don’t have an export like Wordpress. There were some scripts out there but I could not make them work.

I had to repost manually some of the postings. I also deleted some postings I was not happy with.

Here is how you do this:

Again…this is if you have Octopress.

Create a file called 404.html inside the folder “source”

Inside that folder you could enter this code. This will add some text to your 404 page and redirect it to your website. Replace where appropriate (title, yourwebsite.com, header, body):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title> Some Title here </title>

    <script type="text/javascript"> function delayer() {window.location = "http://yourwebsite.com"} </script>
  </head>

  <body onLoad="setTimeout('delayer()', 5000)">
        <h1> Some header </h1>
        <p> some paragraph</p>
  </body>
</html>