Browse Source

added 404 config

theming
Will Webberley 1 year ago
parent
commit
55827417dc
2 changed files with 15 additions and 6 deletions
  1. 7
      now.json
  2. 14
      src/pages/404.js

7
now.json

@ -0,0 +1,7 @@
{
"version": 2,
"routes": [
{ "handle": "filesystem" },
{ "src": "/.*", "status": 404, "dest": "404.html" }
]
}

14
src/pages/404.js

@ -1,10 +1,12 @@
import React from 'react'
const NotFoundPage = () => (
<div>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
</div>
import Layout from '../components/Layout/Layout.js';
const ErrorPage = () => (
<Layout>
<h2 style={{fontFamily:'Courier, Monospace'}}>~/errors/404</h2>
<p>The requested file was not found.</p>
</Layout>
)
export default NotFoundPage
export default ErrorPage
Loading…
Cancel
Save