diff --git a/src/pages/index.page.tsx b/src/pages/+Page.tsx similarity index 100% rename from src/pages/index.page.tsx rename to src/pages/+Page.tsx diff --git a/src/renderer/_error.page.tsx b/src/pages/_error/+Page.tsx similarity index 100% rename from src/renderer/_error.page.tsx rename to src/pages/_error/+Page.tsx diff --git a/src/pages/about/index.page.tsx b/src/pages/about/+Page.tsx similarity index 100% rename from src/pages/about/index.page.tsx rename to src/pages/about/+Page.tsx diff --git a/src/pages/column/@id.page.ts b/src/pages/column/@id/+Page.ts similarity index 100% rename from src/pages/column/@id.page.ts rename to src/pages/column/@id/+Page.ts diff --git a/src/pages/column/@id.page.server.ts b/src/pages/column/@id/+onBeforeRender.ts similarity index 100% rename from src/pages/column/@id.page.server.ts rename to src/pages/column/@id/+onBeforeRender.ts diff --git a/src/pages/dev/index.page.ts b/src/pages/dev/+Page.ts similarity index 100% rename from src/pages/dev/index.page.ts rename to src/pages/dev/+Page.ts diff --git a/src/pages/dev/globe/index.page.ts b/src/pages/dev/globe/+Page.ts similarity index 100% rename from src/pages/dev/globe/index.page.ts rename to src/pages/dev/globe/+Page.ts diff --git a/src/pages/dev/paleo/index.page.ts b/src/pages/dev/paleo/+Page.ts similarity index 100% rename from src/pages/dev/paleo/index.page.ts rename to src/pages/dev/paleo/+Page.ts diff --git a/src/pages/dev/security/index.page.ts b/src/pages/dev/security/+Page.ts similarity index 100% rename from src/pages/dev/security/index.page.ts rename to src/pages/dev/security/+Page.ts diff --git a/src/pages/dev/security/index.page.route.ts b/src/pages/dev/security/+guard.ts similarity index 100% rename from src/pages/dev/security/index.page.route.ts rename to src/pages/dev/security/+guard.ts diff --git a/src/pages/dev/security/endpoint/index.page.ts b/src/pages/dev/security/endpoint/+Page.ts similarity index 100% rename from src/pages/dev/security/endpoint/index.page.ts rename to src/pages/dev/security/endpoint/+Page.ts diff --git a/src/pages/dev/ui-tests/index.page.ts b/src/pages/dev/ui-tests/+Page.ts similarity index 100% rename from src/pages/dev/ui-tests/index.page.ts rename to src/pages/dev/ui-tests/+Page.ts diff --git a/src/pages/dev/ui-tests/data-sheet.page.ts b/src/pages/dev/ui-tests/data-sheet/+Page.ts similarity index 96% rename from src/pages/dev/ui-tests/data-sheet.page.ts rename to src/pages/dev/ui-tests/data-sheet/+Page.ts index eb7db396..39cef894 100644 --- a/src/pages/dev/ui-tests/data-sheet.page.ts +++ b/src/pages/dev/ui-tests/data-sheet/+Page.ts @@ -1,7 +1,7 @@ -import hyper from "@macrostrat/hyper"; import { Breadcrumbs, HotkeysProvider } from "@blueprintjs/core"; +import hyper from "@macrostrat/hyper"; import { ClientOnly } from "~/renderer/client-only"; -import style from "./main.module.sass"; +import style from "../main.module.sass"; const h = hyper.styled(style); diff --git a/src/pages/map/index.page.ts b/src/pages/map/+Page.ts similarity index 100% rename from src/pages/map/index.page.ts rename to src/pages/map/+Page.ts diff --git a/src/pages/map/index.page.route.ts b/src/pages/map/+route.ts similarity index 100% rename from src/pages/map/index.page.route.ts rename to src/pages/map/+route.ts diff --git a/src/pages/maps/index.page.ts b/src/pages/maps/+Page.ts similarity index 100% rename from src/pages/maps/index.page.ts rename to src/pages/maps/+Page.ts diff --git a/src/pages/maps/index.page.server.ts b/src/pages/maps/+onBeforeRender.ts similarity index 100% rename from src/pages/maps/index.page.server.ts rename to src/pages/maps/+onBeforeRender.ts diff --git a/src/pages/maps/@id/index.page.ts b/src/pages/maps/@id/+Page.ts similarity index 100% rename from src/pages/maps/@id/index.page.ts rename to src/pages/maps/@id/+Page.ts diff --git a/src/pages/maps/@id/edit/index.page.ts b/src/pages/maps/@id/edit/+Page.ts similarity index 100% rename from src/pages/maps/@id/edit/index.page.ts rename to src/pages/maps/@id/edit/+Page.ts diff --git a/src/pages/maps/@id/edit/index.page.route.ts b/src/pages/maps/@id/edit/+route.ts similarity index 100% rename from src/pages/maps/@id/edit/index.page.route.ts rename to src/pages/maps/@id/edit/+route.ts diff --git a/src/renderer/+config.h.ts b/src/renderer/+config.h.ts new file mode 100644 index 00000000..252bcc0b --- /dev/null +++ b/src/renderer/+config.h.ts @@ -0,0 +1,5 @@ +import { Config } from "vike/types"; + +export default { + passToClient: ["pageProps", "urlPathname"], +} satisfies Config; diff --git a/src/renderer/_default.page.client.tsx b/src/renderer/+onRenderClient.tsx similarity index 96% rename from src/renderer/_default.page.client.tsx rename to src/renderer/+onRenderClient.tsx index a59af55b..d1019168 100644 --- a/src/renderer/_default.page.client.tsx +++ b/src/renderer/+onRenderClient.tsx @@ -1,9 +1,9 @@ -export { render }; +export { render as onRenderClient }; +import { FocusStyleManager } from "@blueprintjs/core"; import { hydrateRoot } from "react-dom/client"; import { PageShell } from "./page-shell"; import type { PageContextClient } from "./types"; -import { FocusStyleManager } from "@blueprintjs/core"; // This render() hook only supports SSR, see https://vike.dev/render-modes for how to modify render() to support SPA async function render(pageContext: PageContextClient) { diff --git a/src/renderer/_default.page.server.tsx b/src/renderer/+onRenderHtml.tsx similarity index 93% rename from src/renderer/_default.page.server.tsx rename to src/renderer/+onRenderHtml.tsx index 5c8ebca9..e00cec93 100644 --- a/src/renderer/_default.page.server.tsx +++ b/src/renderer/+onRenderHtml.tsx @@ -1,10 +1,9 @@ -export { render }; +export { render as onRenderHtml }; // See https://vike.dev/data-fetching -export const passToClient = ["pageProps", "urlPathname"]; import ReactDOMServer from "react-dom/server"; +import { dangerouslySkipEscape, escapeInject } from "vike/server"; import { PageShell } from "./page-shell"; -import { escapeInject, dangerouslySkipEscape } from "vike/server"; import type { PageContextServer } from "./types"; async function render(pageContext: PageContextServer) {