Skip to content

Commit 8602f1c

Browse files
authored
Merge pull request #447 from preactjs/docs-fix
fix docs build
2 parents 03ccdd0 + f9d988a commit 8602f1c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/public/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Header() {
2323
<HeaderArea>
2424
<nav>
2525
<Link href="/">Home</Link>
26-
<Link href="/docs">Docs</Link>
26+
{/* <Link href="/docs">Docs</Link> */}
2727
</nav>
2828
<div>
2929
<Link href="https://github.com/preactjs/wmr">

docs/public/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { extractCss, setup, styled } from 'goober';
77
import { prefix } from 'goober/prefixer';
88

99
import Home from './pages/home.tsx';
10-
import Docs from './pages/docs.tsx';
10+
// import Docs from './pages/docs.tsx';
1111
import Header from './header.tsx';
1212
import { GlobalStyles } from './GlobalStyles';
1313

@@ -26,8 +26,8 @@ export function App() {
2626
<Main>
2727
<Router>
2828
<Home path="/" />
29-
<Docs path="/docs" />
30-
<Docs path="/docs/:name" />
29+
{/* <Docs path="/docs" />
30+
<Docs path="/docs/:name" /> */}
3131
</Router>
3232
</Main>
3333
</ErrorBoundary>

docs/public/pages/docs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import pages from 'dir:./docs';
55
import SideBar from './sideBar';
66

77
const routes = pages.map(name => ({
8-
Route: lazy(() => import(`./docs/${name}`)),
8+
Route: lazy(() => import(`./docs/${name.replace(/\.tsx/g,'')}.tsx`)),
99
url: '/docs' + name.replace(/(index)?\.\w+$/, '')
1010
}));
1111

0 commit comments

Comments
 (0)