Compare commits
2 Commits
9e27c0bef3
...
6b02b4f4e7
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b02b4f4e7 | |||
| 48bc83cdad |
@ -1,3 +1,4 @@
|
|||||||
|
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";
|
||||||
@ -14,7 +15,7 @@ const pagesDir = `${root}/dist/client`;
|
|||||||
async function startServer() {
|
async function startServer() {
|
||||||
const app = Fastify();
|
const app = Fastify();
|
||||||
|
|
||||||
await app.register(await import("@fastify/static"), {
|
app.register(fastifyStatic, {
|
||||||
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: "/og.webp",
|
image: "/opengraph/og.png",
|
||||||
|
|
||||||
prerender: true,
|
prerender: true,
|
||||||
prefetchStaticAssets: "hover",
|
prefetchStaticAssets: "hover",
|
||||||
|
|||||||
@ -14,8 +14,6 @@ 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,
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
import { Button } from "@/components/Button";
|
|
||||||
|
|
||||||
# TEST
|
|
||||||
|
|
||||||
<Button>test</Button>
|
|
||||||
|
|
||||||
> OK
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
console.log("It works");
|
|
||||||
```
|
|
||||||
BIN
app/public/opengraph/og.png
Normal file
BIN
app/public/opengraph/og.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
Loading…
Reference in New Issue
Block a user