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