Compare commits
No commits in common. "6b02b4f4e79172afc346bec7b44d2867d8fbcdba" and "9e27c0bef3b291214bdac3efbcc7dce6d73556ae" have entirely different histories.
6b02b4f4e7
...
9e27c0bef3
@ -1,4 +1,3 @@
|
|||||||
import fastifyStatic from "@fastify/static";
|
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import { search } from "./libs/search";
|
import { search } from "./libs/search";
|
||||||
import { dirname } from "node:path";
|
import { dirname } from "node:path";
|
||||||
@ -15,7 +14,7 @@ const pagesDir = `${root}/dist/client`;
|
|||||||
async function startServer() {
|
async function startServer() {
|
||||||
const app = Fastify();
|
const app = Fastify();
|
||||||
|
|
||||||
app.register(fastifyStatic, {
|
await app.register(await import("@fastify/static"), {
|
||||||
root: `${root}/dist/client`,
|
root: `${root}/dist/client`,
|
||||||
wildcard: false,
|
wildcard: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export default {
|
|||||||
class: "flex min-h-full bg-white",
|
class: "flex min-h-full bg-white",
|
||||||
},
|
},
|
||||||
|
|
||||||
image: "/opengraph/og.png",
|
image: "/og.webp",
|
||||||
|
|
||||||
prerender: true,
|
prerender: true,
|
||||||
prefetchStaticAssets: "hover",
|
prefetchStaticAssets: "hover",
|
||||||
|
|||||||
@ -14,6 +14,8 @@ export async function data(pageContext: PageContext) {
|
|||||||
} = pageContext;
|
} = pageContext;
|
||||||
const isRoot = urlParsed.pathname === "/";
|
const isRoot = urlParsed.pathname === "/";
|
||||||
|
|
||||||
|
console.log({ isRoot, urlParsed });
|
||||||
|
|
||||||
config({
|
config({
|
||||||
title: buildTitle(isRoot ? undefined : frontmatter?.title),
|
title: buildTitle(isRoot ? undefined : frontmatter?.title),
|
||||||
description: frontmatter?.description,
|
description: frontmatter?.description,
|
||||||
|
|||||||
11
app/pages/test/+Page.mdx
Normal file
11
app/pages/test/+Page.mdx
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import { Button } from "@/components/Button";
|
||||||
|
|
||||||
|
# TEST
|
||||||
|
|
||||||
|
<Button>test</Button>
|
||||||
|
|
||||||
|
> OK
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
console.log("It works");
|
||||||
|
```
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB |
Loading…
Reference in New Issue
Block a user