Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/app/[[...mdxPath]]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ export default async function RootLayout({ children }: { children: ReactNode })
const pageMap = await getPageMap()
return (
<html lang="en" suppressHydrationWarning className={`${geistSans.variable} ${geistMono.variable}`}>
<Head />
<Head>
<meta
httpEquiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data:; font-src 'self' data: https://fonts.gstatic.com; connect-src 'self';"
/>
</Head>
<body className="font-sans antialiased">
<Layout
navbar={<Navbar logo={
Expand Down
4 changes: 4 additions & 0 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import nextra from 'nextra'

const withNextra = nextra({})

const isProd = process.env.NODE_ENV === 'production'

export default withNextra({
output: 'export',
trailingSlash: true,
basePath: isProd ? '/typescript' : '',
assetPrefix: isProd ? '/typescript/' : '',
images: {
unoptimized: true
},
Expand Down
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const nextConfig: NextConfig = {
async headers() {
return [
{
source: "/(.*)",
source: "/((?!typescript/).*)",
headers: [
{
key: "Content-Security-Policy",
Expand Down
Loading