@kamod-ch/preactpress 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -49
- package/bin/preactpress.mjs +5 -5
- package/dist/client/app.d.ts +1 -1
- package/dist/client/app.d.ts.map +1 -1
- package/dist/client/app.js +55 -42
- package/dist/client/app.js.map +1 -1
- package/dist/client/entry-client.js +11 -12
- package/dist/client/entry-client.js.map +1 -1
- package/dist/client/entry-ssr.d.ts +2 -2
- package/dist/client/entry-ssr.d.ts.map +1 -1
- package/dist/client/entry-ssr.js +16 -16
- package/dist/client/entry-ssr.js.map +1 -1
- package/dist/client/index.d.ts +3 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/loadPage.d.ts +2 -1
- package/dist/client/loadPage.d.ts.map +1 -1
- package/dist/client/loadPage.js +15 -12
- package/dist/client/loadPage.js.map +1 -1
- package/dist/client/prefetchLinks.js +4 -4
- package/dist/client/prefetchLinks.js.map +1 -1
- package/dist/client/theme-default/AlgoliaSearch.d.ts +3 -3
- package/dist/client/theme-default/AlgoliaSearch.d.ts.map +1 -1
- package/dist/client/theme-default/AlgoliaSearch.js +15 -15
- package/dist/client/theme-default/AlgoliaSearch.js.map +1 -1
- package/dist/client/theme-default/Features.d.ts +2 -2
- package/dist/client/theme-default/Features.d.ts.map +1 -1
- package/dist/client/theme-default/Features.js +10 -8
- package/dist/client/theme-default/Features.js.map +1 -1
- package/dist/client/theme-default/Hero.d.ts +2 -2
- package/dist/client/theme-default/Hero.d.ts.map +1 -1
- package/dist/client/theme-default/Hero.js +9 -7
- package/dist/client/theme-default/Hero.js.map +1 -1
- package/dist/client/theme-default/Layout.d.ts +3 -3
- package/dist/client/theme-default/Layout.d.ts.map +1 -1
- package/dist/client/theme-default/Layout.js +56 -99
- package/dist/client/theme-default/Layout.js.map +1 -1
- package/dist/client/theme-default/Logo.d.ts +2 -2
- package/dist/client/theme-default/Logo.d.ts.map +1 -1
- package/dist/client/theme-default/Logo.js +8 -8
- package/dist/client/theme-default/Logo.js.map +1 -1
- package/dist/client/theme-default/NavLinks.d.ts +2 -2
- package/dist/client/theme-default/NavLinks.d.ts.map +1 -1
- package/dist/client/theme-default/NavLinks.js +3 -3
- package/dist/client/theme-default/NavLinks.js.map +1 -1
- package/dist/client/theme-default/SidebarNav.d.ts +2 -2
- package/dist/client/theme-default/SidebarNav.d.ts.map +1 -1
- package/dist/client/theme-default/SidebarNav.js +3 -3
- package/dist/client/theme-default/SidebarNav.js.map +1 -1
- package/dist/client/theme-default/SocialLinks.d.ts +2 -2
- package/dist/client/theme-default/SocialLinks.d.ts.map +1 -1
- package/dist/client/theme-default/SocialLinks.js +1 -1
- package/dist/client/theme-default/SocialLinks.js.map +1 -1
- package/dist/client/theme-default/ThemeToggle.d.ts +2 -3
- package/dist/client/theme-default/ThemeToggle.d.ts.map +1 -1
- package/dist/client/theme-default/ThemeToggle.js +2 -30
- package/dist/client/theme-default/ThemeToggle.js.map +1 -1
- package/dist/client/theme-default/index.d.ts +1 -1
- package/dist/client/theme-default/index.d.ts.map +1 -1
- package/dist/client/theme-default/index.js +1 -1
- package/dist/client/theme-default/index.js.map +1 -1
- package/dist/client/theme-utils.d.ts +24 -0
- package/dist/client/theme-utils.d.ts.map +1 -0
- package/dist/client/theme-utils.js +107 -0
- package/dist/client/theme-utils.js.map +1 -0
- package/dist/client/types.d.ts +5 -5
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/usePageHead.d.ts +2 -2
- package/dist/client/usePageHead.d.ts.map +1 -1
- package/dist/client/usePageHead.js +61 -56
- package/dist/client/usePageHead.js.map +1 -1
- package/dist/client/useSiteSearch.d.ts.map +1 -1
- package/dist/client/useSiteSearch.js +8 -8
- package/dist/client/useSiteSearch.js.map +1 -1
- package/dist/node/build.d.ts +1 -1
- package/dist/node/build.d.ts.map +1 -1
- package/dist/node/build.js +105 -96
- package/dist/node/build.js.map +1 -1
- package/dist/node/buildCache.d.ts.map +1 -1
- package/dist/node/buildCache.js +7 -7
- package/dist/node/buildCache.js.map +1 -1
- package/dist/node/check.d.ts +1 -1
- package/dist/node/check.d.ts.map +1 -1
- package/dist/node/check.js +52 -52
- package/dist/node/check.js.map +1 -1
- package/dist/node/cli.js +61 -64
- package/dist/node/cli.js.map +1 -1
- package/dist/node/config-helpers.d.ts +4 -4
- package/dist/node/config-helpers.d.ts.map +1 -1
- package/dist/node/config-helpers.js +1 -1
- package/dist/node/config-helpers.js.map +1 -1
- package/dist/node/config.d.ts +4 -4
- package/dist/node/config.d.ts.map +1 -1
- package/dist/node/config.js +37 -40
- package/dist/node/config.js.map +1 -1
- package/dist/node/content.d.ts +4 -4
- package/dist/node/content.d.ts.map +1 -1
- package/dist/node/content.js +28 -28
- package/dist/node/content.js.map +1 -1
- package/dist/node/createContentLoader.d.ts +1 -1
- package/dist/node/createContentLoader.d.ts.map +1 -1
- package/dist/node/createContentLoader.js +3 -3
- package/dist/node/createContentLoader.js.map +1 -1
- package/dist/node/devCss.d.ts +1 -1
- package/dist/node/devCss.d.ts.map +1 -1
- package/dist/node/devCss.js +5 -6
- package/dist/node/devCss.js.map +1 -1
- package/dist/node/devSsr.d.ts +3 -3
- package/dist/node/devSsr.d.ts.map +1 -1
- package/dist/node/devSsr.js +32 -32
- package/dist/node/devSsr.js.map +1 -1
- package/dist/node/dynamicRoutes.d.ts +2 -2
- package/dist/node/dynamicRoutes.d.ts.map +1 -1
- package/dist/node/dynamicRoutes.js +24 -24
- package/dist/node/dynamicRoutes.js.map +1 -1
- package/dist/node/favicon.d.ts +2 -2
- package/dist/node/favicon.d.ts.map +1 -1
- package/dist/node/favicon.js +26 -24
- package/dist/node/favicon.js.map +1 -1
- package/dist/node/feed.d.ts +2 -2
- package/dist/node/feed.d.ts.map +1 -1
- package/dist/node/feed.js +18 -16
- package/dist/node/feed.js.map +1 -1
- package/dist/node/hooks.d.ts +2 -2
- package/dist/node/hooks.d.ts.map +1 -1
- package/dist/node/hooks.js +1 -1
- package/dist/node/hooks.js.map +1 -1
- package/dist/node/html.d.ts +8 -8
- package/dist/node/html.d.ts.map +1 -1
- package/dist/node/html.js +75 -64
- package/dist/node/html.js.map +1 -1
- package/dist/node/index.d.ts +11 -11
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +8 -8
- package/dist/node/index.js.map +1 -1
- package/dist/node/init.d.ts +2 -0
- package/dist/node/init.d.ts.map +1 -1
- package/dist/node/init.js +59 -27
- package/dist/node/init.js.map +1 -1
- package/dist/node/lastUpdated.d.ts +2 -2
- package/dist/node/lastUpdated.d.ts.map +1 -1
- package/dist/node/lastUpdated.js +7 -4
- package/dist/node/lastUpdated.js.map +1 -1
- package/dist/node/loadSiteModule.js +2 -2
- package/dist/node/loadSiteModule.js.map +1 -1
- package/dist/node/markdown.d.ts +2 -2
- package/dist/node/markdown.d.ts.map +1 -1
- package/dist/node/markdown.js +110 -110
- package/dist/node/markdown.js.map +1 -1
- package/dist/node/markdownHeadings.d.ts +1 -1
- package/dist/node/markdownHeadings.d.ts.map +1 -1
- package/dist/node/markdownHeadings.js +11 -11
- package/dist/node/markdownHeadings.js.map +1 -1
- package/dist/node/markdownInclude.d.ts.map +1 -1
- package/dist/node/markdownInclude.js +11 -11
- package/dist/node/markdownInclude.js.map +1 -1
- package/dist/node/markdownSnippets.d.ts.map +1 -1
- package/dist/node/markdownSnippets.js +34 -34
- package/dist/node/markdownSnippets.js.map +1 -1
- package/dist/node/mdx.d.ts +1 -1
- package/dist/node/mdx.d.ts.map +1 -1
- package/dist/node/mdx.js +4 -4
- package/dist/node/mdx.js.map +1 -1
- package/dist/node/packageRoot.d.ts.map +1 -1
- package/dist/node/packageRoot.js +4 -4
- package/dist/node/packageRoot.js.map +1 -1
- package/dist/node/pageDataLoaders.d.ts +2 -2
- package/dist/node/pageDataLoaders.d.ts.map +1 -1
- package/dist/node/pageDataLoaders.js +24 -20
- package/dist/node/pageDataLoaders.js.map +1 -1
- package/dist/node/paths.d.ts.map +1 -1
- package/dist/node/paths.js +4 -4
- package/dist/node/paths.js.map +1 -1
- package/dist/node/plugin.d.ts +3 -3
- package/dist/node/plugin.d.ts.map +1 -1
- package/dist/node/plugin.js +66 -66
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/resolveDeps.js +10 -10
- package/dist/node/resolveDeps.js.map +1 -1
- package/dist/node/serve.d.ts.map +1 -1
- package/dist/node/serve.js +13 -15
- package/dist/node/serve.js.map +1 -1
- package/dist/node/server.d.ts +3 -3
- package/dist/node/server.d.ts.map +1 -1
- package/dist/node/server.js +28 -25
- package/dist/node/server.js.map +1 -1
- package/dist/node/siteConfig.d.ts +12 -12
- package/dist/node/siteConfig.d.ts.map +1 -1
- package/dist/node/tagIndex.d.ts +5 -5
- package/dist/node/tagIndex.d.ts.map +1 -1
- package/dist/node/tagIndex.js +10 -10
- package/dist/node/tagIndex.js.map +1 -1
- package/dist/shared/contentChunk.d.ts.map +1 -1
- package/dist/shared/contentChunk.js +6 -6
- package/dist/shared/contentChunk.js.map +1 -1
- package/dist/shared/contentSchema.d.ts.map +1 -1
- package/dist/shared/contentSchema.js +11 -11
- package/dist/shared/contentSchema.js.map +1 -1
- package/dist/shared/deadLinks.d.ts.map +1 -1
- package/dist/shared/deadLinks.js +6 -6
- package/dist/shared/deadLinks.js.map +1 -1
- package/dist/shared/escapeHtml.js +4 -4
- package/dist/shared/escapeHtml.js.map +1 -1
- package/dist/shared/index.d.ts +14 -14
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +14 -14
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/locale.d.ts +1 -1
- package/dist/shared/locale.d.ts.map +1 -1
- package/dist/shared/locale.js +10 -10
- package/dist/shared/locale.js.map +1 -1
- package/dist/shared/pageChrome.d.ts +4 -4
- package/dist/shared/pageChrome.d.ts.map +1 -1
- package/dist/shared/pageChrome.js +21 -21
- package/dist/shared/pageChrome.js.map +1 -1
- package/dist/shared/pageHead.d.ts +1 -1
- package/dist/shared/pageHead.d.ts.map +1 -1
- package/dist/shared/pageHead.js +4 -4
- package/dist/shared/pageHead.js.map +1 -1
- package/dist/shared/pageMeta.d.ts +5 -5
- package/dist/shared/pageMeta.d.ts.map +1 -1
- package/dist/shared/pageMeta.js +15 -17
- package/dist/shared/pageMeta.js.map +1 -1
- package/dist/shared/rewrites.d.ts +1 -1
- package/dist/shared/rewrites.d.ts.map +1 -1
- package/dist/shared/rewrites.js +2 -2
- package/dist/shared/rewrites.js.map +1 -1
- package/dist/shared/route.js +5 -5
- package/dist/shared/route.js.map +1 -1
- package/dist/shared/scrollRestoration.d.ts +10 -0
- package/dist/shared/scrollRestoration.d.ts.map +1 -0
- package/dist/shared/scrollRestoration.js +66 -0
- package/dist/shared/scrollRestoration.js.map +1 -0
- package/dist/shared/search.d.ts +3 -3
- package/dist/shared/search.d.ts.map +1 -1
- package/dist/shared/search.js +18 -15
- package/dist/shared/search.js.map +1 -1
- package/dist/shared/sidebar.d.ts +1 -1
- package/dist/shared/sidebar.d.ts.map +1 -1
- package/dist/shared/sidebar.js +4 -4
- package/dist/shared/sidebar.js.map +1 -1
- package/dist/shared/slug.d.ts +1 -1
- package/dist/shared/slug.d.ts.map +1 -1
- package/dist/shared/slug.js +5 -5
- package/dist/shared/slug.js.map +1 -1
- package/dist/shared/socialIcons.d.ts.map +1 -1
- package/dist/shared/socialIcons.js +4 -4
- package/dist/shared/socialIcons.js.map +1 -1
- package/dist/shared/tags.js +8 -8
- package/dist/shared/tags.js.map +1 -1
- package/dist/shared/theme.d.ts +1 -1
- package/dist/shared/theme.d.ts.map +1 -1
- package/dist/shared/theme.js +16 -10
- package/dist/shared/theme.js.map +1 -1
- package/dist/shared/themeLabels.d.ts +1 -1
- package/dist/shared/themeLabels.d.ts.map +1 -1
- package/dist/shared/themeLabels.js +26 -26
- package/dist/shared/themeLabels.js.map +1 -1
- package/dist/shared/url.d.ts.map +1 -1
- package/dist/shared/url.js +3 -3
- package/dist/shared/url.js.map +1 -1
- package/package.json +33 -9
- package/src/client/app.tsx +111 -92
- package/src/client/entry-client.tsx +17 -19
- package/src/client/entry-ssr.tsx +33 -33
- package/src/client/index.ts +16 -2
- package/src/client/loadPage.ts +41 -38
- package/src/client/prefetchLinks.ts +30 -30
- package/src/client/theme-default/AlgoliaSearch.tsx +46 -46
- package/src/client/theme-default/Features.tsx +27 -21
- package/src/client/theme-default/Hero.tsx +22 -18
- package/src/client/theme-default/Layout.tsx +189 -244
- package/src/client/theme-default/Logo.tsx +30 -40
- package/src/client/theme-default/NavLinks.tsx +21 -21
- package/src/client/theme-default/SidebarNav.tsx +29 -29
- package/src/client/theme-default/SocialLinks.tsx +11 -11
- package/src/client/theme-default/ThemeToggle.tsx +2 -78
- package/src/client/theme-default/index.ts +1 -1
- package/src/client/theme-default/styles.css +30 -21
- package/src/client/theme-utils.tsx +184 -0
- package/src/client/types.ts +30 -24
- package/src/client/usePageHead.ts +128 -128
- package/src/client/useSiteSearch.ts +34 -34
- package/src/client/virtual.d.ts +76 -76
- package/src/shared/contentChunk.ts +6 -6
- package/src/shared/contentSchema.ts +52 -49
- package/src/shared/deadLinks.ts +16 -16
- package/src/shared/escapeHtml.ts +5 -5
- package/src/shared/index.ts +21 -25
- package/src/shared/locale.ts +46 -46
- package/src/shared/pageChrome.ts +123 -123
- package/src/shared/pageHead.ts +16 -16
- package/src/shared/pageMeta.ts +79 -79
- package/src/shared/rewrites.ts +14 -16
- package/src/shared/route.ts +7 -7
- package/src/shared/scrollRestoration.ts +70 -0
- package/src/shared/search.ts +56 -52
- package/src/shared/sidebar.ts +28 -28
- package/src/shared/slug.ts +13 -13
- package/src/shared/socialIcons.ts +12 -14
- package/src/shared/tags.ts +20 -20
- package/src/shared/theme.ts +22 -13
- package/src/shared/themeLabels.ts +45 -45
- package/src/shared/url.ts +6 -10
- package/templates/default/.preactpress/config.ts +17 -17
- package/templates/default/README.md +16 -16
- package/templates/default/guide/first-five-minutes.md +21 -21
- package/templates/default/index.html +1 -1
- package/templates/default/index.md +9 -9
- package/templates/default/package.json +1 -1
- package/templates/default/pnpm-lock.yaml +5 -5
- package/templates/docs/.preactpress/config.ts +76 -56
- package/templates/docs/README.md +6 -6
- package/templates/docs/components/BenefitsGrid.tsx +45 -0
- package/templates/docs/components/CliBlock.tsx +38 -0
- package/templates/docs/components/ComparisonTable.tsx +60 -0
- package/templates/docs/components/CopyableCommand.tsx +86 -0
- package/templates/docs/components/Counter.tsx +7 -5
- package/templates/docs/components/MarketingHero.tsx +63 -0
- package/templates/docs/components/MdxDemo.tsx +96 -0
- package/templates/docs/components/References.tsx +62 -0
- package/templates/docs/components/TemplateGallery.tsx +46 -0
- package/templates/docs/components/marketing.css +992 -0
- package/templates/docs/examples/algolia-docsearch.md +33 -0
- package/templates/docs/examples/content-loader.data.ts +11 -0
- package/templates/docs/examples/content-loader.md +29 -0
- package/templates/docs/examples/dynamic-routes.md +16 -0
- package/templates/docs/examples/static-assets.md +13 -0
- package/templates/docs/guide/advanced.md +4 -4
- package/templates/docs/guide/commands.md +10 -10
- package/templates/docs/guide/configuration.md +43 -43
- package/templates/docs/guide/creating-pages.md +60 -39
- package/templates/docs/guide/custom-themes.md +9 -9
- package/templates/docs/guide/deploy.md +29 -29
- package/templates/docs/guide/first-five-minutes.md +22 -22
- package/templates/docs/guide/getting-started.md +29 -31
- package/templates/docs/guide/markdown-and-mdx.md +1 -1
- package/templates/docs/guide/routing.md +40 -40
- package/templates/docs/guide/what-is-preactpress.md +18 -18
- package/templates/docs/index.html +1 -1
- package/templates/docs/index.mdx +25 -0
- package/templates/docs/interactive.mdx +1 -1
- package/templates/docs/markdown-examples.md +73 -21
- package/templates/docs/package.json +1 -1
- package/templates/docs/packages/[pkg].md +15 -0
- package/templates/docs/packages/[pkg].paths.ts +20 -0
- package/templates/docs/parts/include-body.md +1 -0
- package/templates/docs/pnpm-lock.yaml +5 -5
- package/templates/docs/public/preactpress-example.txt +1 -0
- package/templates/docs/snippets/greet.ts +1 -1
- package/templates/hono/.preactpress/config.ts +65 -65
- package/templates/hono/.preactpress/theme/CodeSnippet.tsx +15 -15
- package/templates/hono/.preactpress/theme/FeatureGrid.tsx +7 -7
- package/templates/hono/.preactpress/theme/Hero.tsx +13 -13
- package/templates/hono/.preactpress/theme/Layout.tsx +122 -164
- package/templates/hono/.preactpress/theme/Logo.tsx +6 -6
- package/templates/hono/.preactpress/theme/ThemeToggle.tsx +3 -70
- package/templates/hono/.preactpress/theme/hono.css +31 -14
- package/templates/hono/README.md +17 -15
- package/templates/hono/components/Counter.tsx +7 -5
- package/templates/hono/de/guide/configuration.md +18 -20
- package/templates/hono/de/guide/deploy.md +29 -29
- package/templates/hono/de/guide/first-five-minutes.md +21 -21
- package/templates/hono/de/guide/getting-started.md +29 -29
- package/templates/hono/de/guide/routing.md +26 -25
- package/templates/hono/de/guide/seiten-erstellen.md +39 -39
- package/templates/hono/de/guide/what-is-preactpress.md +18 -18
- package/templates/hono/de/index.mdx +20 -17
- package/templates/hono/de/interactive.mdx +1 -1
- package/templates/hono/de/markdown-examples.md +6 -6
- package/templates/hono/de/parts/include-body.md +1 -0
- package/templates/hono/de/snippets/greet.ts +1 -1
- package/templates/hono/guide/configuration.md +25 -25
- package/templates/hono/guide/creating-pages.md +39 -39
- package/templates/hono/guide/deploy.md +29 -29
- package/templates/hono/guide/first-five-minutes.md +21 -21
- package/templates/hono/guide/getting-started.md +29 -29
- package/templates/hono/guide/routing.md +40 -40
- package/templates/hono/guide/what-is-preactpress.md +18 -18
- package/templates/hono/index.html +1 -1
- package/templates/hono/index.mdx +21 -17
- package/templates/hono/interactive.mdx +1 -1
- package/templates/hono/markdown-examples.md +6 -6
- package/templates/hono/package.json +1 -1
- package/templates/hono/parts/include-body.md +1 -0
- package/templates/hono/pnpm-lock.yaml +5 -5
- package/templates/hono/snippets/greet.ts +1 -1
- package/templates/magazine/.preactpress/config.ts +19 -19
- package/templates/magazine/.preactpress/theme/Layout.tsx +69 -172
- package/templates/magazine/.preactpress/theme/TeaserGrid.tsx +14 -14
- package/templates/magazine/.preactpress/theme/ThemeToggle.tsx +4 -70
- package/templates/magazine/.preactpress/theme/magazine.css +13 -8
- package/templates/magazine/README.md +30 -0
- package/templates/magazine/article-markets.md +2 -2
- package/templates/magazine/article-tech.mdx +10 -10
- package/templates/magazine/index.data.ts +9 -9
- package/templates/magazine/index.html +5 -1
- package/templates/magazine/index.mdx +1 -1
- package/templates/magazine/package.json +1 -1
- package/templates/magazine/pnpm-lock.yaml +2917 -0
- package/templates/docs/about.md +0 -10
- package/templates/docs/dist/404.html +0 -29
- package/templates/docs/dist/about/index.html +0 -32
- package/templates/docs/dist/assets/esm-DzlBxN5p.js +0 -110
- package/templates/docs/dist/assets/interactive-64o6YwrR.js +0 -9
- package/templates/docs/dist/assets/interactive-BedCloEw.js +0 -9
- package/templates/docs/dist/assets/main-BVLeh8GO.js +0 -1
- package/templates/docs/dist/assets/main-CreUBb3N.js +0 -1
- package/templates/docs/dist/assets/main-oodK-zZy.css +0 -2
- package/templates/docs/dist/de/guide/getting-started/index.html +0 -36
- package/templates/docs/dist/de/guide/what-is-preactpress/index.html +0 -38
- package/templates/docs/dist/de/index.html +0 -29
- package/templates/docs/dist/favicon-32.png +0 -0
- package/templates/docs/dist/favicon.png +0 -0
- package/templates/docs/dist/favicon.svg +0 -28
- package/templates/docs/dist/guide/advanced/index.html +0 -53
- package/templates/docs/dist/guide/commands/index.html +0 -89
- package/templates/docs/dist/guide/configuration/index.html +0 -196
- package/templates/docs/dist/guide/creating-pages/index.html +0 -234
- package/templates/docs/dist/guide/custom-themes/index.html +0 -52
- package/templates/docs/dist/guide/default-theme/index.html +0 -53
- package/templates/docs/dist/guide/deploy/index.html +0 -195
- package/templates/docs/dist/guide/first-five-minutes/index.html +0 -99
- package/templates/docs/dist/guide/getting-started/index.html +0 -173
- package/templates/docs/dist/guide/markdown-and-mdx/index.html +0 -59
- package/templates/docs/dist/guide/routing/index.html +0 -192
- package/templates/docs/dist/guide/what-is-preactpress/index.html +0 -141
- package/templates/docs/dist/index.html +0 -30
- package/templates/docs/dist/interactive/index.html +0 -37
- package/templates/docs/dist/markdown-examples/index.html +0 -231
- package/templates/docs/dist/preactpress-content/404.json +0 -8
- package/templates/docs/dist/preactpress-content/_index.json +0 -50
- package/templates/docs/dist/preactpress-content/about.json +0 -15
- package/templates/docs/dist/preactpress-content/de.json +0 -45
- package/templates/docs/dist/preactpress-content/de__guide__getting-started.json +0 -26
- package/templates/docs/dist/preactpress-content/de__guide__what-is-preactpress.json +0 -21
- package/templates/docs/dist/preactpress-content/guide__advanced.json +0 -46
- package/templates/docs/dist/preactpress-content/guide__commands.json +0 -26
- package/templates/docs/dist/preactpress-content/guide__configuration.json +0 -51
- package/templates/docs/dist/preactpress-content/guide__creating-pages.json +0 -71
- package/templates/docs/dist/preactpress-content/guide__custom-themes.json +0 -15
- package/templates/docs/dist/preactpress-content/guide__default-theme.json +0 -36
- package/templates/docs/dist/preactpress-content/guide__deploy.json +0 -56
- package/templates/docs/dist/preactpress-content/guide__first-five-minutes.json +0 -36
- package/templates/docs/dist/preactpress-content/guide__getting-started.json +0 -51
- package/templates/docs/dist/preactpress-content/guide__markdown-and-mdx.json +0 -31
- package/templates/docs/dist/preactpress-content/guide__routing.json +0 -71
- package/templates/docs/dist/preactpress-content/guide__what-is-preactpress.json +0 -51
- package/templates/docs/dist/preactpress-content/markdown-examples.json +0 -71
- package/templates/docs/dist/preactpress-content/tags__markdown.json +0 -16
- package/templates/docs/dist/preactpress-search.json +0 -166
- package/templates/docs/dist/preactpress-theme.js +0 -1
- package/templates/docs/dist/tags/markdown/index.html +0 -32
- package/templates/docs/index.md +0 -28
- package/templates/hono/dist/404.html +0 -29
- package/templates/hono/dist/README/index.html +0 -104
- package/templates/hono/dist/about/index.html +0 -32
- package/templates/hono/dist/assets/Counter-CCEByS-J.js +0 -1
- package/templates/hono/dist/assets/Hero--o6WMNvm.js +0 -2
- package/templates/hono/dist/assets/de-D5r6Ye70.js +0 -10
- package/templates/hono/dist/assets/hono-BXWYYdyv.js +0 -10
- package/templates/hono/dist/assets/interactive-Bxo-WBpC.js +0 -9
- package/templates/hono/dist/assets/interactive-BznI4IQ3.js +0 -9
- package/templates/hono/dist/assets/main-Bqi-VFEk.js +0 -2
- package/templates/hono/dist/assets/main-DIIN7FO0.css +0 -1
- package/templates/hono/dist/de/about/index.html +0 -32
- package/templates/hono/dist/de/guide/commands/index.html +0 -41
- package/templates/hono/dist/de/guide/configuration/index.html +0 -105
- package/templates/hono/dist/de/guide/deploy/index.html +0 -195
- package/templates/hono/dist/de/guide/first-five-minutes/index.html +0 -99
- package/templates/hono/dist/de/guide/getting-started/index.html +0 -173
- package/templates/hono/dist/de/guide/routing/index.html +0 -165
- package/templates/hono/dist/de/guide/seiten-erstellen/index.html +0 -234
- package/templates/hono/dist/de/guide/what-is-preactpress/index.html +0 -141
- package/templates/hono/dist/de/index.html +0 -30
- package/templates/hono/dist/de/interactive/index.html +0 -37
- package/templates/hono/dist/de/markdown-examples/index.html +0 -97
- package/templates/hono/dist/de/parts/include-body/index.html +0 -36
- package/templates/hono/dist/de/tags/markdown/index.html +0 -32
- package/templates/hono/dist/favicon-32.png +0 -0
- package/templates/hono/dist/favicon.png +0 -0
- package/templates/hono/dist/favicon.svg +0 -28
- package/templates/hono/dist/guide/commands/index.html +0 -41
- package/templates/hono/dist/guide/configuration/index.html +0 -158
- package/templates/hono/dist/guide/creating-pages/index.html +0 -234
- package/templates/hono/dist/guide/deploy/index.html +0 -195
- package/templates/hono/dist/guide/first-five-minutes/index.html +0 -99
- package/templates/hono/dist/guide/getting-started/index.html +0 -173
- package/templates/hono/dist/guide/routing/index.html +0 -165
- package/templates/hono/dist/guide/what-is-preactpress/index.html +0 -141
- package/templates/hono/dist/index.html +0 -30
- package/templates/hono/dist/interactive/index.html +0 -37
- package/templates/hono/dist/markdown-examples/index.html +0 -105
- package/templates/hono/dist/partials/shared-note/index.html +0 -30
- package/templates/hono/dist/parts/include-body/index.html +0 -36
- package/templates/hono/dist/preactpress-content/404.json +0 -8
- package/templates/hono/dist/preactpress-content/README.json +0 -26
- package/templates/hono/dist/preactpress-content/about.json +0 -15
- package/templates/hono/dist/preactpress-content/de__about.json +0 -15
- package/templates/hono/dist/preactpress-content/de__guide__commands.json +0 -36
- package/templates/hono/dist/preactpress-content/de__guide__configuration.json +0 -41
- package/templates/hono/dist/preactpress-content/de__guide__deploy.json +0 -56
- package/templates/hono/dist/preactpress-content/de__guide__first-five-minutes.json +0 -36
- package/templates/hono/dist/preactpress-content/de__guide__getting-started.json +0 -51
- package/templates/hono/dist/preactpress-content/de__guide__routing.json +0 -61
- package/templates/hono/dist/preactpress-content/de__guide__seiten-erstellen.json +0 -71
- package/templates/hono/dist/preactpress-content/de__guide__what-is-preactpress.json +0 -51
- package/templates/hono/dist/preactpress-content/de__markdown-examples.json +0 -131
- package/templates/hono/dist/preactpress-content/de__parts__include-body.json +0 -16
- package/templates/hono/dist/preactpress-content/de__tags__markdown.json +0 -16
- package/templates/hono/dist/preactpress-content/guide__commands.json +0 -36
- package/templates/hono/dist/preactpress-content/guide__configuration.json +0 -51
- package/templates/hono/dist/preactpress-content/guide__creating-pages.json +0 -71
- package/templates/hono/dist/preactpress-content/guide__deploy.json +0 -56
- package/templates/hono/dist/preactpress-content/guide__first-five-minutes.json +0 -36
- package/templates/hono/dist/preactpress-content/guide__getting-started.json +0 -51
- package/templates/hono/dist/preactpress-content/guide__routing.json +0 -61
- package/templates/hono/dist/preactpress-content/guide__what-is-preactpress.json +0 -51
- package/templates/hono/dist/preactpress-content/markdown-examples.json +0 -141
- package/templates/hono/dist/preactpress-content/partials__shared-note.json +0 -10
- package/templates/hono/dist/preactpress-content/parts__include-body.json +0 -16
- package/templates/hono/dist/preactpress-content/tags__markdown.json +0 -16
- package/templates/hono/dist/preactpress-search.json +0 -242
- package/templates/hono/dist/preactpress-theme.js +0 -1
- package/templates/hono/dist/tags/markdown/index.html +0 -32
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"kind": "markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Configuration",
|
|
5
|
-
"description": "Site config, theme options, and common frontmatter fields"
|
|
6
|
-
},
|
|
7
|
-
"html": "<p>Configuration lives in <code>.preactpress/config.ts</code> at your site root.</p>\n<h2 id=\"site-metadata\" class=\"pp-heading\">Site metadata<a class=\"pp-heading-anchor\" href=\"#site-metadata\" aria-label=\"Link to this section\">#</a></h2>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My docs'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> description: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Short site summary for SEO'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> url: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://example.com'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> titleTemplate: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">':title | :siteTitle'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Set <code>site.url</code> before production so canonical URLs, <code>sitemap.xml</code>, Open Graph, and <code>hreflang</code> alternates resolve correctly.</p>\n<h2 id=\"content-directory\" class=\"pp-heading\">Content directory<a class=\"pp-heading-anchor\" href=\"#content-directory\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Option</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>srcDir</code></td>\n<td>Folder with <code>.md</code> / <code>.mdx</code> pages (default <code>.</code>)</td>\n</tr>\n<tr>\n<td><code>srcExclude</code></td>\n<td>Glob patterns for non-page Markdown, e.g. <code>['**/README.md']</code></td>\n</tr>\n<tr>\n<td><code>lastUpdatedGit</code></td>\n<td>Use git commit time for “last updated” (falls back to file mtime)</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"theme-without-custom-code\" class=\"pp-heading\">Theme without custom code<a class=\"pp-heading-anchor\" href=\"#theme-without-custom-code\" aria-label=\"Link to this section\">#</a></h2>\n<p><code>themeConfig</code> drives the default layout:</p>\n<ul>\n<li><code>nav</code> — top links; supports nested dropdowns via <code>items</code></li>\n<li><code>sidebar</code> — flat array <strong>or</strong> path map: <code>{ '/guide/': [...], '/reference/': [...] }</code>; groups and items support <code>collapsed</code> and nested <code>items</code></li>\n<li><code>outline</code>, <code>search</code>, <code>socialLinks</code>, <code>footer</code>, <code>lastUpdated</code>, <code>editLink</code>, <code>logo</code>, <code>labels</code></li>\n<li><code>logo</code> — string URL or <code>{ light, dark }</code> for theme-aware images</li>\n<li><code>search</code> — <code>true</code> or <code>{ provider: 'local' }</code> for sidebar search; <code>{ provider: 'algolia', options }</code> for Algolia DocSearch in the nav bar</li>\n<li><code>socialLinks</code> — <code>{ icon, link, ariaLabel? }[]</code> with built-in icons (<code>github</code>, <code>discord</code>, <code>x</code>, …) or custom <code>{ svg }</code></li>\n</ul>\n<p>Per-locale overrides go under <code>locales.<key>.themeConfig</code>.</p>\n<p>Example nested nav and sidebar:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">themeConfig</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> logo</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { </span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">light</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/logo-light.svg'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, </span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">dark</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/logo-dark.svg'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> labels</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { </span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">search</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Find pages'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> nav</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Guide'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, items: [{ text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Intro'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/intro'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }] },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Blog'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/blog'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> sidebar</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Guide'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> collapsed: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">false</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> items: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Intro'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/intro'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Advanced'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> collapsed: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">true</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> items: [{ text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'API'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/api'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><h3 id=\"search-providers\" class=\"pp-heading\">Search providers<a class=\"pp-heading-anchor\" href=\"#search-providers\" aria-label=\"Link to this section\">#</a></h3>\n<p>Local search (default when <code>search: true</code>) filters the sidebar and loads <code>preactpress-search.json</code> at build time.</p>\n<p>Algolia DocSearch mounts a search button in the nav bar:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">themeConfig</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> search</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> provider</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'algolia'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> options</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> appId</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'YOUR_APP_ID'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> apiKey</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'YOUR_SEARCH_API_KEY'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> indexName</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'YOUR_INDEX_NAME'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> locales</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> de</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: { </span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">indexName</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'YOUR_DE_INDEX'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><h3 id=\"social-links\" class=\"pp-heading\">Social links<a class=\"pp-heading-anchor\" href=\"#social-links\" aria-label=\"Link to this section\">#</a></h3>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">themeConfig</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\"> socialLinks</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { icon: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'github'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://github.com/your-org/your-repo'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { icon: { svg: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'<svg ...></svg>'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://example.com'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, ariaLabel: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Company site'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><h2 id=\"global-head-tags\" class=\"pp-heading\">Global head tags<a class=\"pp-heading-anchor\" href=\"#global-head-tags\" aria-label=\"Link to this section\">#</a></h2>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">head</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> [</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'meta'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, { name: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'theme-color'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, content: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'#0f766e'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">],</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">async </span><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">transformHead</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">({ route, title, tags, site }) {</span></span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\"> return</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> [[</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'meta'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, { name: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'pp-route'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, content: route }]]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><h2 id=\"page-frontmatter\" class=\"pp-heading\">Page frontmatter<a class=\"pp-heading-anchor\" href=\"#page-frontmatter\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>title</code> / <code>description</code></td>\n<td>Page title and SEO summary</td>\n</tr>\n<tr>\n<td><code>titleTemplate</code></td>\n<td>Override site template; <code>false</code> uses the raw page title</td>\n</tr>\n<tr>\n<td><code>head</code></td>\n<td>Extra <code><meta></code> / <code><link></code> / <code><script></code> tags for this page only</td>\n</tr>\n<tr>\n<td><code>draft: true</code></td>\n<td>Excluded from routes, search, and sitemap</td>\n</tr>\n</tbody>\n</table>\n<p>Example per-page head:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">---</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">title</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">About</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">head</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - - </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">meta</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">name</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">author</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> content</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Your Name</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">---</span></span></code></pre><div class=\"pp-container pp-container-warning\"><p class=\"pp-container-title\">WARNING</p><div class=\"pp-container-body\"><p>Enable <code>markdown.html</code> only for trusted authors — it allows raw HTML in Markdown.</p>\n</div></div>",
|
|
8
|
-
"title": "Configuration",
|
|
9
|
-
"description": "Site config, theme options, and common frontmatter fields",
|
|
10
|
-
"tags": [],
|
|
11
|
-
"pageType": "website",
|
|
12
|
-
"headings": [
|
|
13
|
-
{
|
|
14
|
-
"id": "site-metadata",
|
|
15
|
-
"text": "Site metadata",
|
|
16
|
-
"level": 2
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "content-directory",
|
|
20
|
-
"text": "Content directory",
|
|
21
|
-
"level": 2
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "theme-without-custom-code",
|
|
25
|
-
"text": "Theme without custom code",
|
|
26
|
-
"level": 2
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "search-providers",
|
|
30
|
-
"text": "Search providers",
|
|
31
|
-
"level": 3
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"id": "social-links",
|
|
35
|
-
"text": "Social links",
|
|
36
|
-
"level": 3
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": "global-head-tags",
|
|
40
|
-
"text": "Global head tags",
|
|
41
|
-
"level": 2
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": "page-frontmatter",
|
|
45
|
-
"text": "Page frontmatter",
|
|
46
|
-
"level": 2
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"relativePath": "guide/configuration.md",
|
|
50
|
-
"lastUpdated": "2026-06-05T06:34:20.411Z"
|
|
51
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"kind": "markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Creating pages",
|
|
5
|
-
"description": "Add new Markdown and MDX pages, understand URLs, and wire them into navigation"
|
|
6
|
-
},
|
|
7
|
-
"html": "<h1 id=\"creating-pages\" class=\"pp-heading\">Creating pages<a class=\"pp-heading-anchor\" href=\"#creating-pages\" aria-label=\"Link to this section\">#</a></h1>\n<p>PreactPress builds pages from files — there is no separate page editor or CMS. Every <code>.md</code> or <code>.mdx</code> file under the source directory (<code>srcDir</code>, default: project root) automatically becomes a public URL.</p>\n<h2 id=\"quick-overview\" class=\"pp-heading\">Quick overview<a class=\"pp-heading-anchor\" href=\"#quick-overview\" aria-label=\"Link to this section\">#</a></h2>\n<ol>\n<li>Create a new file (e.g. <code>contact.md</code> or <code>guide/new-page.md</code>).</li>\n<li>Optionally add frontmatter with <code>title</code>, <code>description</code>, and <code>layout</code>.</li>\n<li>Write content in Markdown or MDX.</li>\n<li>The dev server picks up changes automatically — no restart required.</li>\n<li>Optionally add entries to <code>nav</code> and <code>sidebar</code> in <code>.preactpress/config.ts</code>.</li>\n</ol>\n<h2 id=\"step-by-step-a-simple-page\" class=\"pp-heading\">Step by step: a simple page<a class=\"pp-heading-anchor\" href=\"#step-by-step-a-simple-page\" aria-label=\"Link to this section\">#</a></h2>\n<p>Create a Markdown file in the project root (or under <code>srcDir</code>), for example <code>contact.md</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">title</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Contact</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">description</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">How to reach us</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">layout</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">page</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\"># Contact</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Email us at </span><span style=\"color:#24292E;--shiki-light-font-weight:bold;--shiki-dark:#E1E4E8;--shiki-dark-font-weight:bold\">**hello@example.com**</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">.</span></span></code></pre><p>Save the file — with <code>pnpm run dev</code> running, the page is immediately available at <strong>/contact</strong>.</p>\n<blockquote>\n<p><strong>Note</strong>\nThe file name (without extension) determines the URL path. <code>contact.md</code> → <code>/contact</code>, not <code>/contact.md</code>.</p>\n</blockquote>\n<h2 id=\"file-location-url\" class=\"pp-heading\">File location → URL<a class=\"pp-heading-anchor\" href=\"#file-location-url\" aria-label=\"Link to this section\">#</a></h2>\n<p>PreactPress uses <strong>file-based routing</strong>. The path relative to <code>srcDir</code> becomes the route:</p>\n<table>\n<thead>\n<tr>\n<th>File</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>index.md</code></td>\n<td><code>/</code></td>\n</tr>\n<tr>\n<td><code>about.md</code></td>\n<td><code>/about</code></td>\n</tr>\n<tr>\n<td><code>guide/intro.md</code></td>\n<td><code>/guide/intro</code></td>\n</tr>\n<tr>\n<td><code>guide/index.md</code></td>\n<td><code>/guide</code></td>\n</tr>\n<tr>\n<td><code>news/2025/intro.md</code></td>\n<td><code>/news/2025/intro</code></td>\n</tr>\n<tr>\n<td><code>interactive.mdx</code></td>\n<td><code>/interactive</code></td>\n</tr>\n</tbody>\n</table>\n<p>Production builds write directory indexes (<code>dist/about/index.html</code>) so URLs work without <code>.html</code>.</p>\n<p>More detail: <a href=\"/guide/routing\">Routing</a>.</p>\n<h2 id=\"source-directory-srcdir\" class=\"pp-heading\">Source directory (<code>srcDir</code>)<a class=\"pp-heading-anchor\" href=\"#source-directory-srcdir\" aria-label=\"Link to this section\">#</a></h2>\n<p>By default, Markdown files live in the project root next to <code>.preactpress/</code>. You can move content into a subfolder:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6A737D;--shiki-dark:#6A737D\">// .preactpress/config.ts</span></span>\n<span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> srcDir: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'docs'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Then all pages live under <code>docs/</code> — e.g. <code>docs/index.md</code> → <code>/</code>, <code>docs/guide/foo.md</code> → <code>/guide/foo</code>. URLs stay the same; only the file location changes.</p>\n<h2 id=\"frontmatter-optional-but-recommended\" class=\"pp-heading\">Frontmatter (optional but recommended)<a class=\"pp-heading-anchor\" href=\"#frontmatter-optional-but-recommended\" aria-label=\"Link to this section\">#</a></h2>\n<p>YAML at the top of the file controls metadata and layout:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">title</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">My page</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">description</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Short summary for search, SEO, and social previews</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">layout</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">doc</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span></code></pre><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>title</code></td>\n<td>Page title (nav, <code><title></code>, search)</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>Summary for SEO and search</td>\n</tr>\n<tr>\n<td><code>layout: doc</code></td>\n<td>Docs layout with sidebar, outline, and previous/next links</td>\n</tr>\n<tr>\n<td><code>layout: page</code></td>\n<td>Content page without sidebar or doc outline</td>\n</tr>\n<tr>\n<td><code>layout: home</code></td>\n<td>Home layout with optional <code>hero</code> and <code>features</code></td>\n</tr>\n<tr>\n<td><code>draft: true</code></td>\n<td>Excluded from build, sitemap, and search</td>\n</tr>\n</tbody>\n</table>\n<p>Additional fields (<code>tags</code>, <code>sidebar: false</code>, <code>navbar: false</code>, …) are documented in the package README and starter reference.</p>\n<h2 id=\"mdx-pages-with-components\" class=\"pp-heading\">MDX pages with components<a class=\"pp-heading-anchor\" href=\"#mdx-pages-with-components\" aria-label=\"Link to this section\">#</a></h2>\n<p>When you need interactive UI, use <code>.mdx</code> instead of <code>.md</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">---</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">title</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Demo</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">description</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Interactive component</span></span>\n<span class=\"line\"><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">---</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">import Counter from './components/Counter.tsx'</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">## Counter</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"><Counter initial={3} /></span></span></code></pre><p>Import components relative to the MDX file. <code>##</code> and <code>###</code> headings feed the on-page outline (with <code>layout: doc</code>).</p>\n<p>Example in this starter: <a href=\"/interactive\">Interactive MDX</a>.</p>\n<h2 id=\"add-to-navigation\" class=\"pp-heading\">Add to navigation<a class=\"pp-heading-anchor\" href=\"#add-to-navigation\" aria-label=\"Link to this section\">#</a></h2>\n<p>New pages do <strong>not</strong> appear in the header or sidebar automatically. Register them in <code>.preactpress/config.ts</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> themeConfig: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> nav: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Home'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Contact'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/contact'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> sidebar: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Guide'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> items: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Creating pages'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/creating-pages'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Contact'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/contact'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>For multilingual sites (<code>locales</code>), put <code>nav</code> and <code>sidebar</code> in each locale block — see <a href=\"/guide/getting-started\">Getting Started</a>.</p>\n<h2 id=\"translated-page-locale\" class=\"pp-heading\">Translated page (locale)<a class=\"pp-heading-anchor\" href=\"#translated-page-locale\" aria-label=\"Link to this section\">#</a></h2>\n<p>With locales configured, add translations in language folders:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span>contact.md -> /contact</span></span>\n<span class=\"line\"><span>de/contact.md -> /de/contact</span></span></code></pre><p>Each locale is a <strong>separate file</strong>, not an alias of the default page.</p>\n<h2 id=\"drafts-and-validation\" class=\"pp-heading\">Drafts and validation<a class=\"pp-heading-anchor\" href=\"#drafts-and-validation\" aria-label=\"Link to this section\">#</a></h2>\n<ul>\n<li><strong><code>draft: true</code></strong> in frontmatter: visible in dev only, excluded from production builds.</li>\n<li><strong><code>pnpm run check</code></strong>: validates missing links, unknown layouts, route collisions, and warns on drafts without descriptions.</li>\n</ul>\n<h2 id=\"common-issues\" class=\"pp-heading\">Common issues<a class=\"pp-heading-anchor\" href=\"#common-issues\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Problem</th>\n<th>Fix</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Page returns 404</td>\n<td><code>.md</code> / <code>.mdx</code> extension? File under <code>srcDir</code>? Dev server running?</td>\n</tr>\n<tr>\n<td>Markdown link broken</td>\n<td>Omit extension: <code>/guide/foo</code>, not <code>/guide/foo.md</code></td>\n</tr>\n<tr>\n<td>Duplicate URL</td>\n<td>Two files must not map to the same route (e.g. <code>foo.md</code> and <code>foo/index.md</code>)</td>\n</tr>\n<tr>\n<td>Page missing from nav</td>\n<td>Add to <code>nav</code> / <code>sidebar</code> in config</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"next-steps\" class=\"pp-heading\">Next steps<a class=\"pp-heading-anchor\" href=\"#next-steps\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Link</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>First changes in 5 minutes</td>\n<td><a href=\"/guide/first-five-minutes\">Your first 5 minutes</a></td>\n</tr>\n<tr>\n<td>Routing, <code>srcDir</code>, tags</td>\n<td><a href=\"/guide/routing\">Routing</a></td>\n</tr>\n<tr>\n<td>Markdown syntax</td>\n<td><a href=\"/markdown-examples\">Markdown examples</a></td>\n</tr>\n<tr>\n<td>Production build</td>\n<td><a href=\"/guide/deploy\">Deploy</a></td>\n</tr>\n</tbody>\n</table>\n",
|
|
8
|
-
"title": "Creating pages",
|
|
9
|
-
"description": "Add new Markdown and MDX pages, understand URLs, and wire them into navigation",
|
|
10
|
-
"tags": [],
|
|
11
|
-
"pageType": "website",
|
|
12
|
-
"headings": [
|
|
13
|
-
{
|
|
14
|
-
"id": "quick-overview",
|
|
15
|
-
"text": "Quick overview",
|
|
16
|
-
"level": 2
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "step-by-step-a-simple-page",
|
|
20
|
-
"text": "Step by step: a simple page",
|
|
21
|
-
"level": 2
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "file-location-url",
|
|
25
|
-
"text": "File location → URL",
|
|
26
|
-
"level": 2
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "source-directory-srcdir",
|
|
30
|
-
"text": "Source directory (srcDir)",
|
|
31
|
-
"level": 2
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"id": "frontmatter-optional-but-recommended",
|
|
35
|
-
"text": "Frontmatter (optional but recommended)",
|
|
36
|
-
"level": 2
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": "mdx-pages-with-components",
|
|
40
|
-
"text": "MDX pages with components",
|
|
41
|
-
"level": 2
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": "add-to-navigation",
|
|
45
|
-
"text": "Add to navigation",
|
|
46
|
-
"level": 2
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"id": "translated-page-locale",
|
|
50
|
-
"text": "Translated page (locale)",
|
|
51
|
-
"level": 2
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"id": "drafts-and-validation",
|
|
55
|
-
"text": "Drafts and validation",
|
|
56
|
-
"level": 2
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"id": "common-issues",
|
|
60
|
-
"text": "Common issues",
|
|
61
|
-
"level": 2
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"id": "next-steps",
|
|
65
|
-
"text": "Next steps",
|
|
66
|
-
"level": 2
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"relativePath": "guide/creating-pages.md",
|
|
70
|
-
"lastUpdated": "2026-06-05T05:42:40.492Z"
|
|
71
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"kind": "markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Deploy",
|
|
5
|
-
"description": "Build and publish a PreactPress site"
|
|
6
|
-
},
|
|
7
|
-
"html": "<h1 id=\"deploy\" class=\"pp-heading\">Deploy<a class=\"pp-heading-anchor\" href=\"#deploy\" aria-label=\"Link to this section\">#</a></h1>\n<p>PreactPress builds static files. Production deployment means running a build and uploading the output directory, usually <code>dist/</code>, to a static host.</p>\n<p>No Node server is required in production.</p>\n<h2 id=\"build-and-test-locally\" class=\"pp-heading\">Build and test locally<a class=\"pp-heading-anchor\" href=\"#build-and-test-locally\" aria-label=\"Link to this section\">#</a></h2>\n<p>Run the release checks and production build from your site directory:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> check</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build</span></span></code></pre><p>Preview the build locally:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preview</span></span></code></pre><p>The preview server serves the built output at <strong><a href=\"http://localhost:4173\" target=\"_blank\" rel=\"noopener noreferrer\">http://localhost:4173</a></strong> by default.</p>\n<h2 id=\"configure-production-metadata\" class=\"pp-heading\">Configure production metadata<a class=\"pp-heading-anchor\" href=\"#configure-production-metadata\" aria-label=\"Link to this section\">#</a></h2>\n<p>Set <code>site.url</code> before publishing. PreactPress uses it for canonical URLs, Open Graph metadata, <code>sitemap.xml</code>, and <code>robots.txt</code>.</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My site'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> description: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Short summary for search and social previews'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> url: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://example.com'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> build: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> sitemap: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">true</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> robots: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">true</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><h2 id=\"public-base-path\" class=\"pp-heading\">Public base path<a class=\"pp-heading-anchor\" href=\"#public-base-path\" aria-label=\"Link to this section\">#</a></h2>\n<p>By default, PreactPress assumes your site is served at the domain root:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span>https://example.com/</span></span></code></pre><p>If the site is served from a subpath, set <code>site.base</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> url: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://user.github.io'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/my-repo/'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>You can also override the base path for a single build:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build</span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\"> --base</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> /my-repo/</span></span></code></pre><h2 id=\"build-output\" class=\"pp-heading\">Build output<a class=\"pp-heading-anchor\" href=\"#build-output\" aria-label=\"Link to this section\">#</a></h2>\n<p>The default output directory is <code>dist/</code>:</p>\n<table>\n<thead>\n<tr>\n<th>Output</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>index.html</code>, <code>*/index.html</code></td>\n<td>Static HTML for each route</td>\n</tr>\n<tr>\n<td><code>assets/*</code></td>\n<td>Hashed JavaScript and CSS from Vite</td>\n</tr>\n<tr>\n<td><code>404.html</code></td>\n<td>Not-found page</td>\n</tr>\n<tr>\n<td><code>preactpress-search.json</code></td>\n<td>Search index for the default theme</td>\n</tr>\n<tr>\n<td><code>preactpress-content/*.json</code></td>\n<td>Lazy-loaded Markdown payloads for client navigation</td>\n</tr>\n<tr>\n<td><code>sitemap.xml</code>, <code>robots.txt</code></td>\n<td>Generated when <code>site.url</code> and build flags are set</td>\n</tr>\n<tr>\n<td><code>feed.xml</code></td>\n<td>Generated when <code>build.feed</code> is configured</td>\n</tr>\n</tbody>\n</table>\n<p>Deploy only the output directory. Do not deploy <code>node_modules</code>, <code>.preactpress</code>, or the build cache.</p>\n<h2 id=\"platform-settings\" class=\"pp-heading\">Platform settings<a class=\"pp-heading-anchor\" href=\"#platform-settings\" aria-label=\"Link to this section\">#</a></h2>\n<p>For most static hosts, use these settings:</p>\n<table>\n<thead>\n<tr>\n<th>Host</th>\n<th>Build command</th>\n<th>Output directory</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Netlify</td>\n<td><code>pnpm run build</code></td>\n<td><code>dist</code></td>\n</tr>\n<tr>\n<td>Vercel</td>\n<td><code>pnpm run build</code></td>\n<td><code>dist</code></td>\n</tr>\n<tr>\n<td>Cloudflare Pages</td>\n<td><code>pnpm run build</code></td>\n<td><code>dist</code></td>\n</tr>\n<tr>\n<td>Render Static Site</td>\n<td><code>pnpm run build</code></td>\n<td><code>dist</code></td>\n</tr>\n</tbody>\n</table>\n<p>Install command:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> install</span></span></code></pre><p>Node version: <strong>20 or higher</strong>.</p>\n<h2 id=\"github-pages\" class=\"pp-heading\">GitHub Pages<a class=\"pp-heading-anchor\" href=\"#github-pages\" aria-label=\"Link to this section\">#</a></h2>\n<p>For a project site at <code>https://user.github.io/my-repo/</code>, configure:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> url: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://user.github.io'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/my-repo/'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Then deploy the <code>dist/</code> directory.</p>\n<p>A minimal GitHub Actions workflow can look like this:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">name</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">Deploy PreactPress site to Pages</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">on</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> push</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> branches</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">main</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">]</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> workflow_dispatch</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">permissions</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> contents</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">read</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> pages</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">write</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> id-token</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">write</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">concurrency</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> group</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pages</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> cancel-in-progress</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">false</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">jobs</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> build</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> runs-on</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">ubuntu-latest</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> steps</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">actions/checkout@v4</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pnpm/action-setup@v4</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">actions/setup-node@v4</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> with</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> node-version</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">22</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> cache</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pnpm</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">actions/configure-pages@v5</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">run</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pnpm install</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">run</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pnpm run check</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">run</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">pnpm run build</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">actions/upload-pages-artifact@v3</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> with</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> path</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">dist</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> deploy</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> needs</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">build</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> runs-on</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">ubuntu-latest</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> environment</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> name</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">github-pages</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> url</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">${{ steps.deployment.outputs.page_url }}</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> steps</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">:</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> - </span><span style=\"color:#22863A;--shiki-dark:#85E89D\">id</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">deployment</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\"> uses</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">actions/deploy-pages@v4</span></span></code></pre><p>In your repository settings, set Pages source to <strong>GitHub Actions</strong>.</p>\n<h2 id=\"monorepos\" class=\"pp-heading\">Monorepos<a class=\"pp-heading-anchor\" href=\"#monorepos\" aria-label=\"Link to this section\">#</a></h2>\n<p>In a monorepo, run commands from the site package directory:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">cd</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> packages/docs</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> check</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build</span></span></code></pre><p>Or pass the site path to the CLI:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> ./packages/docs</span></span></code></pre><h2 id=\"cache-headers\" class=\"pp-heading\">Cache headers<a class=\"pp-heading-anchor\" href=\"#cache-headers\" aria-label=\"Link to this section\">#</a></h2>\n<p>Files under <code>assets/</code> include content hashes in their filenames. If your host lets you set HTTP headers, cache those files aggressively:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span>Cache-Control: public, max-age=31536000, immutable</span></span></code></pre><p>Do not apply immutable caching to HTML files or JSON payloads such as <code>preactpress-search.json</code> and <code>preactpress-content/*.json</code>, because those URLs can keep the same names when content changes.</p>\n",
|
|
8
|
-
"title": "Deploy",
|
|
9
|
-
"description": "Build and publish a PreactPress site",
|
|
10
|
-
"tags": [],
|
|
11
|
-
"pageType": "website",
|
|
12
|
-
"headings": [
|
|
13
|
-
{
|
|
14
|
-
"id": "build-and-test-locally",
|
|
15
|
-
"text": "Build and test locally",
|
|
16
|
-
"level": 2
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "configure-production-metadata",
|
|
20
|
-
"text": "Configure production metadata",
|
|
21
|
-
"level": 2
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "public-base-path",
|
|
25
|
-
"text": "Public base path",
|
|
26
|
-
"level": 2
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "build-output",
|
|
30
|
-
"text": "Build output",
|
|
31
|
-
"level": 2
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"id": "platform-settings",
|
|
35
|
-
"text": "Platform settings",
|
|
36
|
-
"level": 2
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": "github-pages",
|
|
40
|
-
"text": "GitHub Pages",
|
|
41
|
-
"level": 2
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": "monorepos",
|
|
45
|
-
"text": "Monorepos",
|
|
46
|
-
"level": 2
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"id": "cache-headers",
|
|
50
|
-
"text": "Cache headers",
|
|
51
|
-
"level": 2
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"relativePath": "guide/deploy.md",
|
|
55
|
-
"lastUpdated": "2026-06-04T07:28:10.774Z"
|
|
56
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"kind": "markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Your first 5 minutes",
|
|
5
|
-
"description": "Change the site title, add a page, and update navigation"
|
|
6
|
-
},
|
|
7
|
-
"html": "<h1 id=\"your-first-5-minutes\" class=\"pp-heading\">Your first 5 minutes<a class=\"pp-heading-anchor\" href=\"#your-first-5-minutes\" aria-label=\"Link to this section\">#</a></h1>\n<p>This hands-on tutorial follows the setup overview in <a href=\"/guide/getting-started\">Getting Started</a>. Follow the steps below in <strong>your</strong> project — this site is the result.</p>\n<h2 id=\"1-change-the-site-title\" class=\"pp-heading\">1. Change the site title<a class=\"pp-heading-anchor\" href=\"#1-change-the-site-title\" aria-label=\"Link to this section\">#</a></h2>\n<p>Edit <code>.preactpress/config.ts</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> description: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Short summary for search and social previews'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Save the file. The dev server picks up config changes on the next request.</p>\n<h2 id=\"2-add-a-page\" class=\"pp-heading\">2. Add a page<a class=\"pp-heading-anchor\" href=\"#2-add-a-page\" aria-label=\"Link to this section\">#</a></h2>\n<p>Create <code>about.md</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">title</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">About</span></span>\n<span class=\"line\"><span style=\"color:#22863A;--shiki-dark:#85E89D\">description</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">About this site</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">---</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\"># About us</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">Your content here.</span></span></code></pre><p>PreactPress serves it at <code>/about</code>. Every <code>.md</code> or <code>.mdx</code> file under <code>srcDir</code> (default: project root) becomes a URL automatically.</p>\n<p>Example: <code>news/2025/intro.md</code> → <code>/news/2025/intro</code>.</p>\n<p>This starter already includes <a href=\"/about\">About</a> so you can see the finished page.</p>\n<h2 id=\"3-add-it-to-the-navigation\" class=\"pp-heading\">3. Add it to the navigation<a class=\"pp-heading-anchor\" href=\"#3-add-it-to-the-navigation\" aria-label=\"Link to this section\">#</a></h2>\n<p>In <code>.preactpress/config.ts</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: { title: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> themeConfig: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> nav: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Home'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'About'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/about'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> sidebar: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Guide'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> items: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Home'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'About'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/about'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Save — the dev server hot-reloads your changes.</p>\n<h2 id=\"next-steps\" class=\"pp-heading\">Next steps<a class=\"pp-heading-anchor\" href=\"#next-steps\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Command</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>pnpm run dev</code></td>\n<td>Dev server with SSR and hot reload</td>\n</tr>\n<tr>\n<td><code>pnpm run check</code></td>\n<td>Validate config, links, and routes</td>\n</tr>\n<tr>\n<td><code>pnpm run build</code></td>\n<td>Static production build → <code>dist/</code></td>\n</tr>\n<tr>\n<td><code>pnpm run preview</code></td>\n<td>Local preview of the build</td>\n</tr>\n</tbody>\n</table>\n<p>Before deploying, set <code>site.url</code> in config for canonical URLs, Open Graph tags, and <code>sitemap.xml</code>. Continue with <a href=\"/guide/routing\">Routing</a> to understand file-based routes, then <a href=\"/guide/deploy\">Deploy</a> for production build steps.</p>\n",
|
|
8
|
-
"title": "Your first 5 minutes",
|
|
9
|
-
"description": "Change the site title, add a page, and update navigation",
|
|
10
|
-
"tags": [],
|
|
11
|
-
"pageType": "website",
|
|
12
|
-
"headings": [
|
|
13
|
-
{
|
|
14
|
-
"id": "1-change-the-site-title",
|
|
15
|
-
"text": "1. Change the site title",
|
|
16
|
-
"level": 2
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "2-add-a-page",
|
|
20
|
-
"text": "2. Add a page",
|
|
21
|
-
"level": 2
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "3-add-it-to-the-navigation",
|
|
25
|
-
"text": "3. Add it to the navigation",
|
|
26
|
-
"level": 2
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "next-steps",
|
|
30
|
-
"text": "Next steps",
|
|
31
|
-
"level": 2
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"relativePath": "guide/first-five-minutes.md",
|
|
35
|
-
"lastUpdated": "2026-06-04T07:28:10.775Z"
|
|
36
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"kind": "markdown",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Getting Started",
|
|
5
|
-
"description": "Install PreactPress and start a new documentation site"
|
|
6
|
-
},
|
|
7
|
-
"html": "<h1 id=\"getting-started\" class=\"pp-heading\">Getting Started<a class=\"pp-heading-anchor\" href=\"#getting-started\" aria-label=\"Link to this section\">#</a></h1>\n<p>This guide shows how to create a PreactPress site, understand the generated files, and start the development server.</p>\n<h2 id=\"prerequisites\" class=\"pp-heading\">Prerequisites<a class=\"pp-heading-anchor\" href=\"#prerequisites\" aria-label=\"Link to this section\">#</a></h2>\n<p>You need:</p>\n<table>\n<thead>\n<tr>\n<th>Requirement</th>\n<th>Version</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Node.js</td>\n<td>20 or higher</td>\n</tr>\n<tr>\n<td>Package manager</td>\n<td>pnpm recommended; npm, yarn, and bun also work</td>\n</tr>\n<tr>\n<td>Editor</td>\n<td>Any editor with Markdown and TypeScript support</td>\n</tr>\n</tbody>\n</table>\n<h2 id=\"create-a-site\" class=\"pp-heading\">Create a site<a class=\"pp-heading-anchor\" href=\"#create-a-site\" aria-label=\"Link to this section\">#</a></h2>\n<p>Start in an empty directory:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">mkdir</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> my-site</span></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">cd</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> my-site</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dlx</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> init</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> install</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dev</span></span></code></pre><p>With npm:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">mkdir</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> my-site</span></span>\n<span class=\"line\"><span style=\"color:#005CC5;--shiki-dark:#79B8FF\">cd</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> my-site</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">npx</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> init</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">npm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> install</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">npm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dev</span></span></code></pre><p>Open <strong><a href=\"http://localhost:5173\" target=\"_blank\" rel=\"noopener noreferrer\">http://localhost:5173</a></strong> to see the starter site.</p>\n<blockquote>\n<p><strong>Note</strong>\n<code>preactpress init</code> copies the built-in starter template and writes <code>preactpress</code> to <code>devDependencies</code>. You do not need to install PreactPress separately before running the initializer.</p>\n</blockquote>\n<h2 id=\"file-structure\" class=\"pp-heading\">File structure<a class=\"pp-heading-anchor\" href=\"#file-structure\" aria-label=\"Link to this section\">#</a></h2>\n<p>After initialization, the project looks like this:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span>my-site/</span></span>\n<span class=\"line\"><span>├── README.md</span></span>\n<span class=\"line\"><span>├── index.html</span></span>\n<span class=\"line\"><span>├── index.md</span></span>\n<span class=\"line\"><span>├── about.md</span></span>\n<span class=\"line\"><span>├── guide/</span></span>\n<span class=\"line\"><span>│ └── first-five-minutes.md</span></span>\n<span class=\"line\"><span>├── markdown-examples.md</span></span>\n<span class=\"line\"><span>├── interactive.mdx</span></span>\n<span class=\"line\"><span>├── components/</span></span>\n<span class=\"line\"><span>│ └── Counter.tsx</span></span>\n<span class=\"line\"><span>└── .preactpress/</span></span>\n<span class=\"line\"><span> └── config.ts</span></span></code></pre><p>The <code>.preactpress</code> directory contains site configuration. Markdown and MDX files outside <code>.preactpress</code> are source files and become routes.</p>\n<h2 id=\"the-config-file\" class=\"pp-heading\">The config file<a class=\"pp-heading-anchor\" href=\"#the-config-file\" aria-label=\"Link to this section\">#</a></h2>\n<p>The starter config lives at <code>.preactpress/config.ts</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> description: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Short summary for search and social previews'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> themeConfig: {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> nav: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Home'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Guide'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/what-is-preactpress'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> sidebar: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Introduction'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">,</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> items: [</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'What is PreactPress?'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/what-is-preactpress'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { text: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Getting Started'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">, link: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/guide/getting-started'</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>Use <code>site</code> for site-wide metadata and <code>themeConfig</code> for default-theme options such as logo (<code>logo: '/logo.svg'</code>), nav, sidebar, search, outline, footer, and edit links.</p>\n<h2 id=\"source-files\" class=\"pp-heading\">Source files<a class=\"pp-heading-anchor\" href=\"#source-files\" aria-label=\"Link to this section\">#</a></h2>\n<p>PreactPress uses file-based routing. By default, the source directory is the project root:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span>index.md -> /</span></span>\n<span class=\"line\"><span>about.md -> /about</span></span>\n<span class=\"line\"><span>guide/getting-started.md -> /guide/getting-started</span></span>\n<span class=\"line\"><span>interactive.mdx -> /interactive</span></span></code></pre><p>You can change the source directory with <code>srcDir</code>:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#D73A49;--shiki-dark:#F97583\">export</span><span style=\"color:#D73A49;--shiki-dark:#F97583\"> default</span><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\"> srcDir: </span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\">'docs'</span></span>\n<span class=\"line\"><span style=\"color:#24292E;--shiki-dark:#E1E4E8\">}</span></span></code></pre><p>With this config, PreactPress reads pages from <code>docs/</code> while <code>.preactpress/config.ts</code> still belongs to the project root.</p>\n<h2 id=\"commands\" class=\"pp-heading\">Commands<a class=\"pp-heading-anchor\" href=\"#commands\" aria-label=\"Link to this section\">#</a></h2>\n<p>The starter includes npm scripts:</p>\n<table>\n<thead>\n<tr>\n<th>Command</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>pnpm run dev</code></td>\n<td>Start the dev server with SSR and hot reload</td>\n</tr>\n<tr>\n<td><code>pnpm run check</code></td>\n<td>Validate config, routes, and links</td>\n</tr>\n<tr>\n<td><code>pnpm run build</code></td>\n<td>Build the static production site into <code>dist/</code></td>\n</tr>\n<tr>\n<td><code>pnpm run preview</code></td>\n<td>Preview the production build locally</td>\n</tr>\n</tbody>\n</table>\n<p>You can also call the CLI directly:</p>\n<pre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dev</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> check</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1;--shiki-dark:#B392F0\">pnpm</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> exec</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preactpress</span><span style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preview</span></span></code></pre><h2 id=\"what-s-next\" class=\"pp-heading\">What’s next?<a class=\"pp-heading-anchor\" href=\"#what-s-next\" aria-label=\"Link to this section\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th>Page</th>\n<th>Why</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><a href=\"/guide/first-five-minutes\">Your first 5 minutes</a></td>\n<td>Change the title, add a page, and wire navigation</td>\n</tr>\n<tr>\n<td><a href=\"/guide/routing\">Routing</a></td>\n<td>Learn how Markdown files map to URLs</td>\n</tr>\n<tr>\n<td><a href=\"/guide/deploy\">Deploy</a></td>\n<td>Build and publish the generated <code>dist/</code> directory</td>\n</tr>\n</tbody>\n</table>\n",
|
|
8
|
-
"title": "Getting Started",
|
|
9
|
-
"description": "Install PreactPress and start a new documentation site",
|
|
10
|
-
"tags": [],
|
|
11
|
-
"pageType": "website",
|
|
12
|
-
"headings": [
|
|
13
|
-
{
|
|
14
|
-
"id": "prerequisites",
|
|
15
|
-
"text": "Prerequisites",
|
|
16
|
-
"level": 2
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"id": "create-a-site",
|
|
20
|
-
"text": "Create a site",
|
|
21
|
-
"level": 2
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"id": "file-structure",
|
|
25
|
-
"text": "File structure",
|
|
26
|
-
"level": 2
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "the-config-file",
|
|
30
|
-
"text": "The config file",
|
|
31
|
-
"level": 2
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"id": "source-files",
|
|
35
|
-
"text": "Source files",
|
|
36
|
-
"level": 2
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"id": "commands",
|
|
40
|
-
"text": "Commands",
|
|
41
|
-
"level": 2
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"id": "what-s-next",
|
|
45
|
-
"text": "What's next?",
|
|
46
|
-
"level": 2
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"relativePath": "guide/getting-started.md",
|
|
50
|
-
"lastUpdated": "2026-06-04T07:28:10.777Z"
|
|
51
|
-
}
|