Files
mykb/pages/_document.js
JJ Kasper e35f6f74eb Fixed route changes not using getUrl causing invalid url to be used when
using pathPrefix, renamed basePath to prefixPath, updated how getUrl
gets the prefixPath to prevent the need for rebuilding when its changed
now just requires restart
2018-06-01 21:17:26 -05:00

33 lines
955 B
JavaScript

import Document, { Head, Main, NextScript } from 'next/document'
import getUrl from '../util/getUrl'
export default class MyDocument extends Document {
render() {
const favicon = getUrl('favicon.icon')
return (
<html>
<Head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<link rel="shortcut icon" href={favicon} type="image/x-icon" />
<link rel="icon" href={favicon} type="image/x-icon" />
<link rel="stylesheet" href={getUrl('/_next/static/style.css')} />
<title>My Knowledge Base</title>
<script
dangerouslySetInnerHTML={{
__html: 'window.kbConf=' + JSON.stringify(app.get('kbConf')),
}}
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
)
}
}