Fix markdown library incompatibility; fix 404
Signed-off-by: Paul W. <lambdapaul@protonmail.com>
This commit is contained in:
parent
35d56f5cde
commit
d3591c4db6
@ -12,10 +12,10 @@
|
||||
"normalize.css": "^8.0.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-markdown": "^8.0.7",
|
||||
"react-markdown": "^9.0.0",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"rehype-raw": "^6.1.1",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"rehype-raw": "^7.0.0",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"uri-js": "^4.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,22 +1,36 @@
|
||||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
import Layout from '../components/layout';
|
||||
|
||||
import style from '../styles/title.module.css';
|
||||
|
||||
function NotFoundPage() {
|
||||
// clean this page up
|
||||
return (
|
||||
<Layout
|
||||
// title='Page Not Found' name='... ??? / 404: Not Found'
|
||||
>
|
||||
<section className='block text center'>
|
||||
<h1>Error 404</h1>
|
||||
<p>
|
||||
<strong>Uh oh! The page you are looking for does not exist...</strong><br />
|
||||
</p>
|
||||
<Link href='/' className='button green back link'>Go Home</Link>
|
||||
<a className='button blue link extern' href='https://en.wikipedia.org/wiki/List_of_HTTP_status_codes'>
|
||||
More on HTTP status codes
|
||||
</a>
|
||||
</section>
|
||||
</Layout>
|
||||
<>
|
||||
<Head>
|
||||
<title>404: Not Found | PaulW.XYZ</title>
|
||||
</Head>
|
||||
<div className={style.container}>
|
||||
<h1 className={style.title}>
|
||||
Page Not Found
|
||||
</h1>
|
||||
</div>
|
||||
<div className={`${style.nav} h1`}>
|
||||
<Link href='/'>PaulW.XYZ</Link> / ... ??? / 404: Not Found </div>
|
||||
<div className='container'>
|
||||
<section className='block text center'>
|
||||
<h1>Error 404</h1>
|
||||
<p>
|
||||
<strong>Uh oh! The page you are looking for does not exist...</strong><br />
|
||||
</p>
|
||||
<Link href='/' className='button green back link'>Go Home</Link>
|
||||
<a className='button blue link extern' href='https://en.wikipedia.org/wiki/List_of_HTTP_status_codes'>
|
||||
More on HTTP status codes
|
||||
</a>
|
||||
</section>
|
||||
</div>
|
||||
</>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,8 @@ import SyntaxHighlighter from 'react-syntax-highlighter';
|
||||
import { monokaiSublime as hlTheme } from 'react-syntax-highlighter/dist/cjs/styles/hljs';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeRaw from 'rehype-raw';
|
||||
import readMarkdown from '../../lib/read-markdown';
|
||||
|
||||
import readMarkdown from '../../lib/read-markdown';
|
||||
import NotesInfo from '../../public/notes.json';
|
||||
|
||||
interface Note {
|
||||
@ -22,9 +22,9 @@ function Markdown({ content }: any) {
|
||||
remarkPlugins={[remarkGfm]}
|
||||
rehypePlugins={[rehypeRaw]}
|
||||
components={{
|
||||
code({ node, inline, className, children, ...props }) {
|
||||
code({ node, className, children, ...props }) {
|
||||
const match = /language-(\w+)/.exec(className || '')
|
||||
return !inline && match
|
||||
return match
|
||||
? (
|
||||
<SyntaxHighlighter
|
||||
showLineNumbers={true}
|
||||
|
Loading…
Reference in New Issue
Block a user