@kamod-ch/preactpress 1.0.0
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/LICENSE +21 -0
- package/README.md +165 -0
- package/assets/favicon-32.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/favicon.svg +28 -0
- package/assets/logo-dark.svg +5 -0
- package/assets/logo-light.svg +5 -0
- package/assets/logo.svg +5 -0
- package/bin/preactpress.mjs +13 -0
- package/dist/client/app.d.ts +6 -0
- package/dist/client/app.d.ts.map +1 -0
- package/dist/client/app.js +168 -0
- package/dist/client/app.js.map +1 -0
- package/dist/client/entry-client.d.ts +2 -0
- package/dist/client/entry-client.d.ts.map +1 -0
- package/dist/client/entry-client.js +27 -0
- package/dist/client/entry-client.js.map +1 -0
- package/dist/client/entry-ssr.d.ts +14 -0
- package/dist/client/entry-ssr.d.ts.map +1 -0
- package/dist/client/entry-ssr.js +59 -0
- package/dist/client/entry-ssr.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/loadPage.d.ts +5 -0
- package/dist/client/loadPage.d.ts.map +1 -0
- package/dist/client/loadPage.js +62 -0
- package/dist/client/loadPage.js.map +1 -0
- package/dist/client/prefetchLinks.d.ts +2 -0
- package/dist/client/prefetchLinks.d.ts.map +1 -0
- package/dist/client/prefetchLinks.js +55 -0
- package/dist/client/prefetchLinks.js.map +1 -0
- package/dist/client/theme-default/AlgoliaSearch.d.ts +12 -0
- package/dist/client/theme-default/AlgoliaSearch.d.ts.map +1 -0
- package/dist/client/theme-default/AlgoliaSearch.js +66 -0
- package/dist/client/theme-default/AlgoliaSearch.js.map +1 -0
- package/dist/client/theme-default/Features.d.ts +9 -0
- package/dist/client/theme-default/Features.d.ts.map +1 -0
- package/dist/client/theme-default/Features.js +25 -0
- package/dist/client/theme-default/Features.js.map +1 -0
- package/dist/client/theme-default/Hero.d.ts +9 -0
- package/dist/client/theme-default/Hero.d.ts.map +1 -0
- package/dist/client/theme-default/Hero.js +23 -0
- package/dist/client/theme-default/Hero.js.map +1 -0
- package/dist/client/theme-default/Layout.d.ts +6 -0
- package/dist/client/theme-default/Layout.d.ts.map +1 -0
- package/dist/client/theme-default/Layout.js +224 -0
- package/dist/client/theme-default/Layout.js.map +1 -0
- package/dist/client/theme-default/Logo.d.ts +16 -0
- package/dist/client/theme-default/Logo.d.ts.map +1 -0
- package/dist/client/theme-default/Logo.js +30 -0
- package/dist/client/theme-default/Logo.js.map +1 -0
- package/dist/client/theme-default/NavLinks.d.ts +12 -0
- package/dist/client/theme-default/NavLinks.d.ts.map +1 -0
- package/dist/client/theme-default/NavLinks.js +18 -0
- package/dist/client/theme-default/NavLinks.js.map +1 -0
- package/dist/client/theme-default/SidebarNav.d.ts +12 -0
- package/dist/client/theme-default/SidebarNav.d.ts.map +1 -0
- package/dist/client/theme-default/SidebarNav.js +21 -0
- package/dist/client/theme-default/SidebarNav.js.map +1 -0
- package/dist/client/theme-default/SocialLinks.d.ts +8 -0
- package/dist/client/theme-default/SocialLinks.d.ts.map +1 -0
- package/dist/client/theme-default/SocialLinks.js +13 -0
- package/dist/client/theme-default/SocialLinks.js.map +1 -0
- package/dist/client/theme-default/ThemeToggle.d.ts +4 -0
- package/dist/client/theme-default/ThemeToggle.d.ts.map +1 -0
- package/dist/client/theme-default/ThemeToggle.js +31 -0
- package/dist/client/theme-default/ThemeToggle.js.map +1 -0
- package/dist/client/theme-default/index.d.ts +2 -0
- package/dist/client/theme-default/index.d.ts.map +1 -0
- package/dist/client/theme-default/index.js +2 -0
- package/dist/client/theme-default/index.js.map +1 -0
- package/dist/client/types.d.ts +36 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/client/usePageHead.d.ts +10 -0
- package/dist/client/usePageHead.d.ts.map +1 -0
- package/dist/client/usePageHead.js +182 -0
- package/dist/client/usePageHead.js.map +1 -0
- package/dist/client/useSiteSearch.d.ts +10 -0
- package/dist/client/useSiteSearch.d.ts.map +1 -0
- package/dist/client/useSiteSearch.js +54 -0
- package/dist/client/useSiteSearch.js.map +1 -0
- package/dist/node/build.d.ts +15 -0
- package/dist/node/build.d.ts.map +1 -0
- package/dist/node/build.js +310 -0
- package/dist/node/build.js.map +1 -0
- package/dist/node/buildCache.d.ts +15 -0
- package/dist/node/buildCache.d.ts.map +1 -0
- package/dist/node/buildCache.js +41 -0
- package/dist/node/buildCache.js.map +1 -0
- package/dist/node/check.d.ts +11 -0
- package/dist/node/check.d.ts.map +1 -0
- package/dist/node/check.js +228 -0
- package/dist/node/check.js.map +1 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.d.ts.map +1 -0
- package/dist/node/cli.js +157 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/node/config-helpers.d.ts +8 -0
- package/dist/node/config-helpers.d.ts.map +1 -0
- package/dist/node/config-helpers.js +5 -0
- package/dist/node/config-helpers.js.map +1 -0
- package/dist/node/config.d.ts +13 -0
- package/dist/node/config.d.ts.map +1 -0
- package/dist/node/config.js +167 -0
- package/dist/node/config.js.map +1 -0
- package/dist/node/content.d.ts +16 -0
- package/dist/node/content.d.ts.map +1 -0
- package/dist/node/content.js +72 -0
- package/dist/node/content.js.map +1 -0
- package/dist/node/createContentLoader.d.ts +19 -0
- package/dist/node/createContentLoader.d.ts.map +1 -0
- package/dist/node/createContentLoader.js +11 -0
- package/dist/node/createContentLoader.js.map +1 -0
- package/dist/node/devCss.d.ts +7 -0
- package/dist/node/devCss.d.ts.map +1 -0
- package/dist/node/devCss.js +70 -0
- package/dist/node/devCss.js.map +1 -0
- package/dist/node/devSsr.d.ts +6 -0
- package/dist/node/devSsr.d.ts.map +1 -0
- package/dist/node/devSsr.js +112 -0
- package/dist/node/devSsr.js.map +1 -0
- package/dist/node/dynamicRoutes.d.ts +21 -0
- package/dist/node/dynamicRoutes.d.ts.map +1 -0
- package/dist/node/dynamicRoutes.js +120 -0
- package/dist/node/dynamicRoutes.js.map +1 -0
- package/dist/node/favicon.d.ts +9 -0
- package/dist/node/favicon.d.ts.map +1 -0
- package/dist/node/favicon.js +71 -0
- package/dist/node/favicon.js.map +1 -0
- package/dist/node/feed.d.ts +7 -0
- package/dist/node/feed.d.ts.map +1 -0
- package/dist/node/feed.js +37 -0
- package/dist/node/feed.js.map +1 -0
- package/dist/node/hooks.d.ts +9 -0
- package/dist/node/hooks.d.ts.map +1 -0
- package/dist/node/hooks.js +20 -0
- package/dist/node/hooks.js.map +1 -0
- package/dist/node/html.d.ts +56 -0
- package/dist/node/html.d.ts.map +1 -0
- package/dist/node/html.js +222 -0
- package/dist/node/html.js.map +1 -0
- package/dist/node/index.d.ts +12 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +9 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/init.d.ts +12 -0
- package/dist/node/init.d.ts.map +1 -0
- package/dist/node/init.js +93 -0
- package/dist/node/init.js.map +1 -0
- package/dist/node/lastUpdated.d.ts +3 -0
- package/dist/node/lastUpdated.d.ts.map +1 -0
- package/dist/node/lastUpdated.js +24 -0
- package/dist/node/lastUpdated.js.map +1 -0
- package/dist/node/loadSiteModule.d.ts +2 -0
- package/dist/node/loadSiteModule.d.ts.map +1 -0
- package/dist/node/loadSiteModule.js +10 -0
- package/dist/node/loadSiteModule.js.map +1 -0
- package/dist/node/markdown.d.ts +31 -0
- package/dist/node/markdown.d.ts.map +1 -0
- package/dist/node/markdown.js +508 -0
- package/dist/node/markdown.js.map +1 -0
- package/dist/node/markdownHeadings.d.ts +12 -0
- package/dist/node/markdownHeadings.d.ts.map +1 -0
- package/dist/node/markdownHeadings.js +70 -0
- package/dist/node/markdownHeadings.js.map +1 -0
- package/dist/node/markdownInclude.d.ts +6 -0
- package/dist/node/markdownInclude.d.ts.map +1 -0
- package/dist/node/markdownInclude.js +74 -0
- package/dist/node/markdownInclude.js.map +1 -0
- package/dist/node/markdownSnippets.d.ts +32 -0
- package/dist/node/markdownSnippets.d.ts.map +1 -0
- package/dist/node/markdownSnippets.js +172 -0
- package/dist/node/markdownSnippets.js.map +1 -0
- package/dist/node/mdx.d.ts +3 -0
- package/dist/node/mdx.d.ts.map +1 -0
- package/dist/node/mdx.js +9 -0
- package/dist/node/mdx.js.map +1 -0
- package/dist/node/packageRoot.d.ts +4 -0
- package/dist/node/packageRoot.d.ts.map +1 -0
- package/dist/node/packageRoot.js +7 -0
- package/dist/node/packageRoot.js.map +1 -0
- package/dist/node/pageDataLoaders.d.ts +6 -0
- package/dist/node/pageDataLoaders.d.ts.map +1 -0
- package/dist/node/pageDataLoaders.js +68 -0
- package/dist/node/pageDataLoaders.js.map +1 -0
- package/dist/node/paths.d.ts +5 -0
- package/dist/node/paths.d.ts.map +1 -0
- package/dist/node/paths.js +12 -0
- package/dist/node/paths.js.map +1 -0
- package/dist/node/plugin.d.ts +7 -0
- package/dist/node/plugin.d.ts.map +1 -0
- package/dist/node/plugin.js +282 -0
- package/dist/node/plugin.js.map +1 -0
- package/dist/node/resolveDeps.d.ts +5 -0
- package/dist/node/resolveDeps.d.ts.map +1 -0
- package/dist/node/resolveDeps.js +25 -0
- package/dist/node/resolveDeps.js.map +1 -0
- package/dist/node/serve.d.ts +6 -0
- package/dist/node/serve.d.ts.map +1 -0
- package/dist/node/serve.js +41 -0
- package/dist/node/serve.js.map +1 -0
- package/dist/node/server.d.ts +7 -0
- package/dist/node/server.d.ts.map +1 -0
- package/dist/node/server.js +55 -0
- package/dist/node/server.js.map +1 -0
- package/dist/node/siteConfig.d.ts +206 -0
- package/dist/node/siteConfig.d.ts.map +1 -0
- package/dist/node/siteConfig.js +2 -0
- package/dist/node/siteConfig.js.map +1 -0
- package/dist/node/tagIndex.d.ts +27 -0
- package/dist/node/tagIndex.d.ts.map +1 -0
- package/dist/node/tagIndex.js +84 -0
- package/dist/node/tagIndex.js.map +1 -0
- package/dist/shared/contentChunk.d.ts +4 -0
- package/dist/shared/contentChunk.d.ts.map +1 -0
- package/dist/shared/contentChunk.js +14 -0
- package/dist/shared/contentChunk.js.map +1 -0
- package/dist/shared/contentSchema.d.ts +43 -0
- package/dist/shared/contentSchema.d.ts.map +1 -0
- package/dist/shared/contentSchema.js +44 -0
- package/dist/shared/contentSchema.js.map +1 -0
- package/dist/shared/deadLinks.d.ts +9 -0
- package/dist/shared/deadLinks.d.ts.map +1 -0
- package/dist/shared/deadLinks.js +27 -0
- package/dist/shared/deadLinks.js.map +1 -0
- package/dist/shared/escapeHtml.d.ts +3 -0
- package/dist/shared/escapeHtml.d.ts.map +1 -0
- package/dist/shared/escapeHtml.js +11 -0
- package/dist/shared/escapeHtml.js.map +1 -0
- package/dist/shared/index.d.ts +15 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +15 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/locale.d.ts +11 -0
- package/dist/shared/locale.d.ts.map +1 -0
- package/dist/shared/locale.js +84 -0
- package/dist/shared/locale.js.map +1 -0
- package/dist/shared/pageChrome.d.ts +80 -0
- package/dist/shared/pageChrome.d.ts.map +1 -0
- package/dist/shared/pageChrome.js +160 -0
- package/dist/shared/pageChrome.js.map +1 -0
- package/dist/shared/pageHead.d.ts +3 -0
- package/dist/shared/pageHead.d.ts.map +1 -0
- package/dist/shared/pageHead.js +28 -0
- package/dist/shared/pageHead.js.map +1 -0
- package/dist/shared/pageMeta.d.ts +60 -0
- package/dist/shared/pageMeta.d.ts.map +1 -0
- package/dist/shared/pageMeta.js +72 -0
- package/dist/shared/pageMeta.js.map +1 -0
- package/dist/shared/rewrites.d.ts +5 -0
- package/dist/shared/rewrites.d.ts.map +1 -0
- package/dist/shared/rewrites.js +23 -0
- package/dist/shared/rewrites.js.map +1 -0
- package/dist/shared/route.d.ts +5 -0
- package/dist/shared/route.d.ts.map +1 -0
- package/dist/shared/route.js +15 -0
- package/dist/shared/route.js.map +1 -0
- package/dist/shared/search.d.ts +39 -0
- package/dist/shared/search.d.ts.map +1 -0
- package/dist/shared/search.js +63 -0
- package/dist/shared/search.js.map +1 -0
- package/dist/shared/sidebar.d.ts +18 -0
- package/dist/shared/sidebar.d.ts.map +1 -0
- package/dist/shared/sidebar.js +51 -0
- package/dist/shared/sidebar.js.map +1 -0
- package/dist/shared/slug.d.ts +4 -0
- package/dist/shared/slug.d.ts.map +1 -0
- package/dist/shared/slug.js +21 -0
- package/dist/shared/slug.js.map +1 -0
- package/dist/shared/socialIcons.d.ts +13 -0
- package/dist/shared/socialIcons.d.ts.map +1 -0
- package/dist/shared/socialIcons.js +27 -0
- package/dist/shared/socialIcons.js.map +1 -0
- package/dist/shared/tags.d.ts +6 -0
- package/dist/shared/tags.d.ts.map +1 -0
- package/dist/shared/tags.js +39 -0
- package/dist/shared/tags.js.map +1 -0
- package/dist/shared/theme.d.ts +8 -0
- package/dist/shared/theme.d.ts.map +1 -0
- package/dist/shared/theme.js +25 -0
- package/dist/shared/theme.js.map +1 -0
- package/dist/shared/themeLabels.d.ts +18 -0
- package/dist/shared/themeLabels.d.ts.map +1 -0
- package/dist/shared/themeLabels.js +51 -0
- package/dist/shared/themeLabels.js.map +1 -0
- package/dist/shared/url.d.ts +7 -0
- package/dist/shared/url.d.ts.map +1 -0
- package/dist/shared/url.js +10 -0
- package/dist/shared/url.js.map +1 -0
- package/package.json +108 -0
- package/src/client/app.tsx +194 -0
- package/src/client/entry-client.tsx +27 -0
- package/src/client/entry-ssr.tsx +77 -0
- package/src/client/index.ts +2 -0
- package/src/client/loadPage.ts +68 -0
- package/src/client/prefetchLinks.ts +60 -0
- package/src/client/theme-default/AlgoliaSearch.tsx +89 -0
- package/src/client/theme-default/Features.tsx +75 -0
- package/src/client/theme-default/Hero.tsx +60 -0
- package/src/client/theme-default/Layout.tsx +525 -0
- package/src/client/theme-default/Logo.tsx +104 -0
- package/src/client/theme-default/NavLinks.tsx +65 -0
- package/src/client/theme-default/SidebarNav.tsx +103 -0
- package/src/client/theme-default/SocialLinks.tsx +41 -0
- package/src/client/theme-default/ThemeToggle.tsx +79 -0
- package/src/client/theme-default/index.ts +1 -0
- package/src/client/theme-default/styles.css +1450 -0
- package/src/client/types.ts +37 -0
- package/src/client/usePageHead.ts +212 -0
- package/src/client/useSiteSearch.ts +57 -0
- package/src/client/virtual.d.ts +103 -0
- package/src/shared/contentChunk.ts +14 -0
- package/src/shared/contentSchema.ts +85 -0
- package/src/shared/deadLinks.ts +33 -0
- package/src/shared/escapeHtml.ts +11 -0
- package/src/shared/index.ts +83 -0
- package/src/shared/locale.ts +116 -0
- package/src/shared/pageChrome.ts +244 -0
- package/src/shared/pageHead.ts +26 -0
- package/src/shared/pageMeta.ts +136 -0
- package/src/shared/rewrites.ts +35 -0
- package/src/shared/route.ts +14 -0
- package/src/shared/search.ts +105 -0
- package/src/shared/sidebar.ts +67 -0
- package/src/shared/slug.ts +23 -0
- package/src/shared/socialIcons.ts +44 -0
- package/src/shared/tags.ts +36 -0
- package/src/shared/theme.ts +26 -0
- package/src/shared/themeLabels.ts +72 -0
- package/src/shared/url.ts +14 -0
- package/templates/default/.preactpress/config.ts +31 -0
- package/templates/default/README.md +45 -0
- package/templates/default/about.md +11 -0
- package/templates/default/guide/first-five-minutes.md +83 -0
- package/templates/default/index.html +18 -0
- package/templates/default/index.md +55 -0
- package/templates/default/package.json +15 -0
- package/templates/default/pnpm-lock.yaml +2917 -0
- package/templates/docs/.preactpress/config.ts +94 -0
- package/templates/docs/README.md +21 -0
- package/templates/docs/about.md +10 -0
- package/templates/docs/components/Counter.tsx +25 -0
- package/templates/docs/de/guide/getting-started.md +19 -0
- package/templates/docs/de/guide/what-is-preactpress.md +15 -0
- package/templates/docs/de/index.md +23 -0
- package/templates/docs/dist/404.html +29 -0
- package/templates/docs/dist/about/index.html +32 -0
- package/templates/docs/dist/assets/esm-DzlBxN5p.js +110 -0
- package/templates/docs/dist/assets/interactive-64o6YwrR.js +9 -0
- package/templates/docs/dist/assets/interactive-BedCloEw.js +9 -0
- package/templates/docs/dist/assets/main-BVLeh8GO.js +1 -0
- package/templates/docs/dist/assets/main-CreUBb3N.js +1 -0
- package/templates/docs/dist/assets/main-oodK-zZy.css +2 -0
- package/templates/docs/dist/de/guide/getting-started/index.html +36 -0
- package/templates/docs/dist/de/guide/what-is-preactpress/index.html +38 -0
- package/templates/docs/dist/de/index.html +29 -0
- package/templates/docs/dist/favicon-32.png +0 -0
- package/templates/docs/dist/favicon.png +0 -0
- package/templates/docs/dist/favicon.svg +28 -0
- package/templates/docs/dist/guide/advanced/index.html +53 -0
- package/templates/docs/dist/guide/commands/index.html +89 -0
- package/templates/docs/dist/guide/configuration/index.html +196 -0
- package/templates/docs/dist/guide/creating-pages/index.html +234 -0
- package/templates/docs/dist/guide/custom-themes/index.html +52 -0
- package/templates/docs/dist/guide/default-theme/index.html +53 -0
- package/templates/docs/dist/guide/deploy/index.html +195 -0
- package/templates/docs/dist/guide/first-five-minutes/index.html +99 -0
- package/templates/docs/dist/guide/getting-started/index.html +173 -0
- package/templates/docs/dist/guide/markdown-and-mdx/index.html +59 -0
- package/templates/docs/dist/guide/routing/index.html +192 -0
- package/templates/docs/dist/guide/what-is-preactpress/index.html +141 -0
- package/templates/docs/dist/index.html +30 -0
- package/templates/docs/dist/interactive/index.html +37 -0
- package/templates/docs/dist/markdown-examples/index.html +231 -0
- package/templates/docs/dist/preactpress-content/404.json +8 -0
- package/templates/docs/dist/preactpress-content/_index.json +50 -0
- package/templates/docs/dist/preactpress-content/about.json +15 -0
- package/templates/docs/dist/preactpress-content/de.json +45 -0
- package/templates/docs/dist/preactpress-content/de__guide__getting-started.json +26 -0
- package/templates/docs/dist/preactpress-content/de__guide__what-is-preactpress.json +21 -0
- package/templates/docs/dist/preactpress-content/guide__advanced.json +46 -0
- package/templates/docs/dist/preactpress-content/guide__commands.json +26 -0
- package/templates/docs/dist/preactpress-content/guide__configuration.json +51 -0
- package/templates/docs/dist/preactpress-content/guide__creating-pages.json +71 -0
- package/templates/docs/dist/preactpress-content/guide__custom-themes.json +15 -0
- package/templates/docs/dist/preactpress-content/guide__default-theme.json +36 -0
- package/templates/docs/dist/preactpress-content/guide__deploy.json +56 -0
- package/templates/docs/dist/preactpress-content/guide__first-five-minutes.json +36 -0
- package/templates/docs/dist/preactpress-content/guide__getting-started.json +51 -0
- package/templates/docs/dist/preactpress-content/guide__markdown-and-mdx.json +31 -0
- package/templates/docs/dist/preactpress-content/guide__routing.json +71 -0
- package/templates/docs/dist/preactpress-content/guide__what-is-preactpress.json +51 -0
- package/templates/docs/dist/preactpress-content/markdown-examples.json +71 -0
- package/templates/docs/dist/preactpress-content/tags__markdown.json +16 -0
- package/templates/docs/dist/preactpress-search.json +166 -0
- package/templates/docs/dist/preactpress-theme.js +1 -0
- package/templates/docs/dist/tags/markdown/index.html +32 -0
- package/templates/docs/guide/advanced.md +44 -0
- package/templates/docs/guide/commands.md +41 -0
- package/templates/docs/guide/configuration.md +130 -0
- package/templates/docs/guide/creating-pages.md +171 -0
- package/templates/docs/guide/custom-themes.md +39 -0
- package/templates/docs/guide/default-theme.md +41 -0
- package/templates/docs/guide/deploy.md +197 -0
- package/templates/docs/guide/first-five-minutes.md +82 -0
- package/templates/docs/guide/getting-started.md +146 -0
- package/templates/docs/guide/markdown-and-mdx.md +59 -0
- package/templates/docs/guide/routing.md +263 -0
- package/templates/docs/guide/what-is-preactpress.md +87 -0
- package/templates/docs/index.html +18 -0
- package/templates/docs/index.md +28 -0
- package/templates/docs/interactive.mdx +32 -0
- package/templates/docs/markdown-examples.md +72 -0
- package/templates/docs/package.json +15 -0
- package/templates/docs/partials/shared-note.md +3 -0
- package/templates/docs/parts/include-body.md +9 -0
- package/templates/docs/pnpm-lock.yaml +2917 -0
- package/templates/docs/snippets/greet.ts +3 -0
- package/templates/hono/.preactpress/config.ts +100 -0
- package/templates/hono/.preactpress/theme/CodeSnippet.tsx +41 -0
- package/templates/hono/.preactpress/theme/FeatureGrid.tsx +27 -0
- package/templates/hono/.preactpress/theme/Hero.tsx +45 -0
- package/templates/hono/.preactpress/theme/Layout.tsx +388 -0
- package/templates/hono/.preactpress/theme/Logo.tsx +26 -0
- package/templates/hono/.preactpress/theme/ThemeToggle.tsx +72 -0
- package/templates/hono/.preactpress/theme/hono.css +1058 -0
- package/templates/hono/README.md +41 -0
- package/templates/hono/about.md +10 -0
- package/templates/hono/components/Counter.tsx +25 -0
- package/templates/hono/de/about.md +10 -0
- package/templates/hono/de/guide/commands.md +44 -0
- package/templates/hono/de/guide/configuration.md +64 -0
- package/templates/hono/de/guide/deploy.md +197 -0
- package/templates/hono/de/guide/first-five-minutes.md +82 -0
- package/templates/hono/de/guide/getting-started.md +146 -0
- package/templates/hono/de/guide/routing.md +220 -0
- package/templates/hono/de/guide/seiten-erstellen.md +171 -0
- package/templates/hono/de/guide/what-is-preactpress.md +87 -0
- package/templates/hono/de/index.mdx +51 -0
- package/templates/hono/de/interactive.mdx +32 -0
- package/templates/hono/de/markdown-examples.md +142 -0
- package/templates/hono/de/parts/include-body.md +9 -0
- package/templates/hono/de/snippets/greet.ts +3 -0
- package/templates/hono/dist/404.html +29 -0
- package/templates/hono/dist/README/index.html +104 -0
- package/templates/hono/dist/about/index.html +32 -0
- package/templates/hono/dist/assets/Counter-CCEByS-J.js +1 -0
- package/templates/hono/dist/assets/Hero--o6WMNvm.js +2 -0
- package/templates/hono/dist/assets/de-D5r6Ye70.js +10 -0
- package/templates/hono/dist/assets/hono-BXWYYdyv.js +10 -0
- package/templates/hono/dist/assets/interactive-Bxo-WBpC.js +9 -0
- package/templates/hono/dist/assets/interactive-BznI4IQ3.js +9 -0
- package/templates/hono/dist/assets/main-Bqi-VFEk.js +2 -0
- package/templates/hono/dist/assets/main-DIIN7FO0.css +1 -0
- package/templates/hono/dist/de/about/index.html +32 -0
- package/templates/hono/dist/de/guide/commands/index.html +41 -0
- package/templates/hono/dist/de/guide/configuration/index.html +105 -0
- package/templates/hono/dist/de/guide/deploy/index.html +195 -0
- package/templates/hono/dist/de/guide/first-five-minutes/index.html +99 -0
- package/templates/hono/dist/de/guide/getting-started/index.html +173 -0
- package/templates/hono/dist/de/guide/routing/index.html +165 -0
- package/templates/hono/dist/de/guide/seiten-erstellen/index.html +234 -0
- package/templates/hono/dist/de/guide/what-is-preactpress/index.html +141 -0
- package/templates/hono/dist/de/index.html +30 -0
- package/templates/hono/dist/de/interactive/index.html +37 -0
- package/templates/hono/dist/de/markdown-examples/index.html +97 -0
- package/templates/hono/dist/de/parts/include-body/index.html +36 -0
- package/templates/hono/dist/de/tags/markdown/index.html +32 -0
- package/templates/hono/dist/favicon-32.png +0 -0
- package/templates/hono/dist/favicon.png +0 -0
- package/templates/hono/dist/favicon.svg +28 -0
- package/templates/hono/dist/guide/commands/index.html +41 -0
- package/templates/hono/dist/guide/configuration/index.html +158 -0
- package/templates/hono/dist/guide/creating-pages/index.html +234 -0
- package/templates/hono/dist/guide/deploy/index.html +195 -0
- package/templates/hono/dist/guide/first-five-minutes/index.html +99 -0
- package/templates/hono/dist/guide/getting-started/index.html +173 -0
- package/templates/hono/dist/guide/routing/index.html +165 -0
- package/templates/hono/dist/guide/what-is-preactpress/index.html +141 -0
- package/templates/hono/dist/index.html +30 -0
- package/templates/hono/dist/interactive/index.html +37 -0
- package/templates/hono/dist/markdown-examples/index.html +105 -0
- package/templates/hono/dist/partials/shared-note/index.html +30 -0
- package/templates/hono/dist/parts/include-body/index.html +36 -0
- package/templates/hono/dist/preactpress-content/404.json +8 -0
- package/templates/hono/dist/preactpress-content/README.json +26 -0
- package/templates/hono/dist/preactpress-content/about.json +15 -0
- package/templates/hono/dist/preactpress-content/de__about.json +15 -0
- package/templates/hono/dist/preactpress-content/de__guide__commands.json +36 -0
- package/templates/hono/dist/preactpress-content/de__guide__configuration.json +41 -0
- package/templates/hono/dist/preactpress-content/de__guide__deploy.json +56 -0
- package/templates/hono/dist/preactpress-content/de__guide__first-five-minutes.json +36 -0
- package/templates/hono/dist/preactpress-content/de__guide__getting-started.json +51 -0
- package/templates/hono/dist/preactpress-content/de__guide__routing.json +61 -0
- package/templates/hono/dist/preactpress-content/de__guide__seiten-erstellen.json +71 -0
- package/templates/hono/dist/preactpress-content/de__guide__what-is-preactpress.json +51 -0
- package/templates/hono/dist/preactpress-content/de__markdown-examples.json +131 -0
- package/templates/hono/dist/preactpress-content/de__parts__include-body.json +16 -0
- package/templates/hono/dist/preactpress-content/de__tags__markdown.json +16 -0
- package/templates/hono/dist/preactpress-content/guide__commands.json +36 -0
- package/templates/hono/dist/preactpress-content/guide__configuration.json +51 -0
- package/templates/hono/dist/preactpress-content/guide__creating-pages.json +71 -0
- package/templates/hono/dist/preactpress-content/guide__deploy.json +56 -0
- package/templates/hono/dist/preactpress-content/guide__first-five-minutes.json +36 -0
- package/templates/hono/dist/preactpress-content/guide__getting-started.json +51 -0
- package/templates/hono/dist/preactpress-content/guide__routing.json +61 -0
- package/templates/hono/dist/preactpress-content/guide__what-is-preactpress.json +51 -0
- package/templates/hono/dist/preactpress-content/markdown-examples.json +141 -0
- package/templates/hono/dist/preactpress-content/partials__shared-note.json +10 -0
- package/templates/hono/dist/preactpress-content/parts__include-body.json +16 -0
- package/templates/hono/dist/preactpress-content/tags__markdown.json +16 -0
- package/templates/hono/dist/preactpress-search.json +242 -0
- package/templates/hono/dist/preactpress-theme.js +1 -0
- package/templates/hono/dist/tags/markdown/index.html +32 -0
- package/templates/hono/guide/commands.md +44 -0
- package/templates/hono/guide/configuration.md +177 -0
- package/templates/hono/guide/creating-pages.md +171 -0
- package/templates/hono/guide/deploy.md +197 -0
- package/templates/hono/guide/first-five-minutes.md +82 -0
- package/templates/hono/guide/getting-started.md +146 -0
- package/templates/hono/guide/routing.md +263 -0
- package/templates/hono/guide/what-is-preactpress.md +87 -0
- package/templates/hono/index.html +18 -0
- package/templates/hono/index.mdx +51 -0
- package/templates/hono/interactive.mdx +32 -0
- package/templates/hono/markdown-examples.md +160 -0
- package/templates/hono/package.json +15 -0
- package/templates/hono/partials/shared-note.md +3 -0
- package/templates/hono/parts/include-body.md +9 -0
- package/templates/hono/pnpm-lock.yaml +2917 -0
- package/templates/hono/snippets/greet.ts +3 -0
- package/templates/magazine/.preactpress/config.ts +36 -0
- package/templates/magazine/.preactpress/theme/Layout.tsx +319 -0
- package/templates/magazine/.preactpress/theme/TeaserGrid.tsx +39 -0
- package/templates/magazine/.preactpress/theme/ThemeToggle.tsx +73 -0
- package/templates/magazine/.preactpress/theme/magazine.css +587 -0
- package/templates/magazine/article-markets.md +24 -0
- package/templates/magazine/article-tech.mdx +35 -0
- package/templates/magazine/index.data.ts +19 -0
- package/templates/magazine/index.html +14 -0
- package/templates/magazine/index.mdx +13 -0
- package/templates/magazine/package.json +15 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Routing
|
|
3
|
+
description: Understand how PreactPress maps files to URLs
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Routing
|
|
7
|
+
|
|
8
|
+
PreactPress uses file-based routing. Every `.md` and `.mdx` file under `srcDir` becomes a route, and production builds write each route as static HTML.
|
|
9
|
+
|
|
10
|
+
## File-based routing
|
|
11
|
+
|
|
12
|
+
Given this structure:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
.
|
|
16
|
+
├── index.md
|
|
17
|
+
├── about.md
|
|
18
|
+
├── guide/
|
|
19
|
+
│ ├── index.md
|
|
20
|
+
│ └── getting-started.md
|
|
21
|
+
└── interactive.mdx
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
PreactPress creates these routes:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
index.md -> /
|
|
28
|
+
about.md -> /about
|
|
29
|
+
guide/index.md -> /guide
|
|
30
|
+
guide/getting-started.md -> /guide/getting-started
|
|
31
|
+
interactive.mdx -> /interactive
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
During production builds, routes are written as directory indexes:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
/ -> dist/index.html
|
|
38
|
+
/about -> dist/about/index.html
|
|
39
|
+
/guide/getting-started -> dist/guide/getting-started/index.html
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
By default (`cleanUrls: true`), builds emit directory indexes so hosts can serve extensionless URLs.
|
|
43
|
+
|
|
44
|
+
## Project root and source directory
|
|
45
|
+
|
|
46
|
+
The project root is where PreactPress looks for `.preactpress/config.ts`.
|
|
47
|
+
|
|
48
|
+
By default, source files also live in the project root:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
.
|
|
52
|
+
├── .preactpress/
|
|
53
|
+
│ └── config.ts
|
|
54
|
+
├── index.md
|
|
55
|
+
└── guide/
|
|
56
|
+
└── getting-started.md
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
You can move content into a nested source directory with `srcDir`:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
export default {
|
|
63
|
+
srcDir: 'docs'
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
That produces this shape:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
.
|
|
71
|
+
├── .preactpress/
|
|
72
|
+
│ └── config.ts
|
|
73
|
+
└── docs/
|
|
74
|
+
├── index.md
|
|
75
|
+
└── guide/
|
|
76
|
+
└── getting-started.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The resulting routes stay the same:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
docs/index.md -> /
|
|
83
|
+
docs/guide/getting-started.md -> /guide/getting-started
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Linking between pages
|
|
87
|
+
|
|
88
|
+
Use absolute or relative links. The recommended style is to omit file extensions:
|
|
89
|
+
|
|
90
|
+
```md
|
|
91
|
+
[Getting Started](/guide/getting-started)
|
|
92
|
+
[Routing](./routing)
|
|
93
|
+
[Home](../)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Avoid linking directly to generated HTML or source Markdown:
|
|
97
|
+
|
|
98
|
+
```md
|
|
99
|
+
<!-- Avoid -->
|
|
100
|
+
[Getting Started](/guide/getting-started.md)
|
|
101
|
+
[Getting Started](/guide/getting-started.html)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`preactpress check` validates local Markdown links that use `.md`, `.mdx`, or `.html` extensions and reports missing pages.
|
|
105
|
+
|
|
106
|
+
## Locale routes
|
|
107
|
+
|
|
108
|
+
PreactPress supports VitePress-style locale folders. Keep the default language at the root and put translations in locale folders:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
index.md -> /
|
|
112
|
+
guide/getting-started.md -> /guide/getting-started
|
|
113
|
+
de/index.md -> /de
|
|
114
|
+
de/guide/getting-started.md -> /de/guide/getting-started
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Configure locale labels, language codes, and locale-specific nav in `.preactpress/config.ts`:
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
export default {
|
|
121
|
+
locales: {
|
|
122
|
+
root: {
|
|
123
|
+
label: 'English',
|
|
124
|
+
lang: 'en'
|
|
125
|
+
},
|
|
126
|
+
de: {
|
|
127
|
+
label: 'Deutsch',
|
|
128
|
+
lang: 'de',
|
|
129
|
+
link: '/de/'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The default theme shows a language switcher when multiple locales are configured.
|
|
136
|
+
|
|
137
|
+
## Tag routes
|
|
138
|
+
|
|
139
|
+
Pages can define tags in frontmatter:
|
|
140
|
+
|
|
141
|
+
```md
|
|
142
|
+
---
|
|
143
|
+
title: Release notes
|
|
144
|
+
tags: [release, changelog]
|
|
145
|
+
---
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Each tag receives an index page:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
release -> /tags/release
|
|
152
|
+
changelog -> /tags/changelog
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
For localized content, tag pages are scoped to the locale:
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
de/guide/intro.md with tag "Markdown" -> /de/tags/markdown
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
If a real Markdown or MDX page exists at the same route as a generated tag index, the real page wins.
|
|
162
|
+
|
|
163
|
+
## Base path
|
|
164
|
+
|
|
165
|
+
Use `site.base` when the site is served from a subpath, for example GitHub Pages project sites:
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
export default {
|
|
169
|
+
site: {
|
|
170
|
+
base: '/my-repo/'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
You can also override it for one build:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pnpm exec preactpress build --base /my-repo/
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Route rewrites
|
|
182
|
+
|
|
183
|
+
Map a public URL to existing content without duplicating files:
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
export default {
|
|
187
|
+
rewrites: {
|
|
188
|
+
'/docs': '/guide',
|
|
189
|
+
'/getting-started': '/guide/intro'
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Keys are the routes visitors use; values must point at routes that already exist from your Markdown files. `preactpress check` validates rewrite sources and collisions.
|
|
195
|
+
|
|
196
|
+
## Clean URLs and hosting
|
|
197
|
+
|
|
198
|
+
| `cleanUrls` | Output for `/about` | Typical host |
|
|
199
|
+
| --- | --- | --- |
|
|
200
|
+
| `true` (default) | `dist/about/index.html` | Netlify, Vercel, Cloudflare Pages, GitHub Pages |
|
|
201
|
+
| `false` | `dist/about.html` | Static buckets without directory index support |
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
export default {
|
|
205
|
+
cleanUrls: false
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Most modern static hosts work with the default. Set `cleanUrls: false` only when your host cannot resolve `/about` to `about/index.html`.
|
|
210
|
+
|
|
211
|
+
## Dynamic routes
|
|
212
|
+
|
|
213
|
+
Generate routes at build time with a bracket template and a colocated `.paths.ts` file:
|
|
214
|
+
|
|
215
|
+
```md
|
|
216
|
+
<!-- packages/[pkg].md -->
|
|
217
|
+
---
|
|
218
|
+
title: "{{ params.pkg }}"
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
# {{ params.pkg }}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
// packages/[pkg].paths.ts
|
|
226
|
+
export default {
|
|
227
|
+
paths() {
|
|
228
|
+
return [
|
|
229
|
+
{ params: { pkg: 'preact' } },
|
|
230
|
+
{ params: { pkg: 'vite' }, props: { note: 'Build tool' } }
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
This emits `/packages/preact` and `/packages/vite`. Use `{{ params.key }}` and `{{ props.key }}` in frontmatter and body.
|
|
237
|
+
|
|
238
|
+
## Data loaders
|
|
239
|
+
|
|
240
|
+
Colocate `*.data.ts` with a page to load build-time data via `createContentLoader` from `@kamod-ch/preactpress/config`. The result is exposed on `page.meta.contentData` (and in themes through the `page` prop).
|
|
241
|
+
|
|
242
|
+
```ts
|
|
243
|
+
// blog.data.ts
|
|
244
|
+
import { createContentLoader } from '@kamod-ch/preactpress/config'
|
|
245
|
+
|
|
246
|
+
export default createContentLoader('posts/*.md', {
|
|
247
|
+
transform(items) {
|
|
248
|
+
return items.map((item) => ({
|
|
249
|
+
title: item.title,
|
|
250
|
+
route: item.route
|
|
251
|
+
}))
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Pair with `blog.md` or `blog/index.md` for route `/blog`.
|
|
257
|
+
|
|
258
|
+
## Current limitations
|
|
259
|
+
|
|
260
|
+
| Feature | Status |
|
|
261
|
+
| --- | --- |
|
|
262
|
+
| Dynamic MDX templates (`[id].mdx`) | Not supported (use `.md` templates) |
|
|
263
|
+
| Pattern-based rewrites with params | Not supported |
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: What is PreactPress?
|
|
3
|
+
description: Learn what PreactPress is and when to use it
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# What is PreactPress?
|
|
7
|
+
|
|
8
|
+
PreactPress is a static site generator for fast, content-focused websites. You write pages in Markdown or MDX, configure navigation and theme options in `.preactpress/config.ts`, and PreactPress generates static HTML that can be deployed to any static host.
|
|
9
|
+
|
|
10
|
+
It is built with [Vite](https://vite.dev/) and [Preact](https://preactjs.com/). The workflow is inspired by VitePress, but the component model is Preact instead of Vue.
|
|
11
|
+
|
|
12
|
+
## Use cases
|
|
13
|
+
|
|
14
|
+
### Documentation
|
|
15
|
+
|
|
16
|
+
PreactPress ships with a small default theme for technical documentation. It includes navigation, sidebar groups, outline links, search, last-updated metadata, and Markdown rendering out of the box.
|
|
17
|
+
|
|
18
|
+
Use it when your docs live naturally as files:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
index.md
|
|
22
|
+
guide/getting-started.md
|
|
23
|
+
guide/routing.md
|
|
24
|
+
reference/api.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Every Markdown or MDX file becomes a page, so documentation grows by adding files and linking them from the sidebar.
|
|
28
|
+
|
|
29
|
+
### Blogs, portfolios, and marketing sites
|
|
30
|
+
|
|
31
|
+
PreactPress can also power blogs, portfolios, and small marketing sites. Markdown handles content, MDX brings in interactive Preact components, and custom themes let you replace the default documentation shell.
|
|
32
|
+
|
|
33
|
+
The separate `preactpress-examples` project includes a custom-theme example that shows a magazine-style layout with article teasers and tag pages.
|
|
34
|
+
|
|
35
|
+
## Developer experience
|
|
36
|
+
|
|
37
|
+
PreactPress focuses on keeping content work simple:
|
|
38
|
+
|
|
39
|
+
| Feature | What it gives you |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| Vite dev server | Fast startup and hot updates while editing content |
|
|
42
|
+
| Markdown frontmatter | Page titles, descriptions, tags, draft status, and social metadata |
|
|
43
|
+
| MDX | Preact components inside content pages |
|
|
44
|
+
| Default theme | Nav, sidebar, outline, search, footer, locale switcher |
|
|
45
|
+
| `preactpress check` | Config, route, and link validation before release |
|
|
46
|
+
|
|
47
|
+
For regular content, use `.md`. When a page needs interactivity, use `.mdx` and import a Preact component:
|
|
48
|
+
|
|
49
|
+
```mdx
|
|
50
|
+
import Counter from './components/Counter.tsx'
|
|
51
|
+
|
|
52
|
+
## Demo
|
|
53
|
+
|
|
54
|
+
<Counter initial={3} />
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Performance
|
|
58
|
+
|
|
59
|
+
PreactPress produces static HTML for every route during the production build. The first visit receives HTML that already contains the page content, which is good for loading speed and SEO.
|
|
60
|
+
|
|
61
|
+
After hydration, client-side navigation takes over. Markdown pages are loaded as small JSON payloads from `preactpress-content/*.json`, so large sites do not need to ship every Markdown body in the initial JavaScript bundle.
|
|
62
|
+
|
|
63
|
+
The production output is static files only:
|
|
64
|
+
|
|
65
|
+
| Output | Purpose |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `index.html`, `*/index.html` | One HTML file per route |
|
|
68
|
+
| `assets/*` | Hashed JavaScript and CSS from Vite |
|
|
69
|
+
| `preactpress-search.json` | Search data for the default theme |
|
|
70
|
+
| `preactpress-content/*.json` | Lazy-loaded Markdown page payloads |
|
|
71
|
+
| `404.html` | Not-found page |
|
|
72
|
+
|
|
73
|
+
## What about VitePress?
|
|
74
|
+
|
|
75
|
+
If you know VitePress, PreactPress should feel familiar: both use Vite, file-based Markdown routing, a default docs theme, and static output.
|
|
76
|
+
|
|
77
|
+
The main difference is the UI stack. VitePress uses Vue. PreactPress uses Preact and MDX, so interactive content and custom themes are written as Preact components.
|
|
78
|
+
|
|
79
|
+
PreactPress is also static-only in production. You build the site once, upload the output directory, and serve it from Netlify, Vercel, Cloudflare Pages, GitHub Pages, S3, Nginx, or another static host.
|
|
80
|
+
|
|
81
|
+
## Next steps
|
|
82
|
+
|
|
83
|
+
| Page | Why |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| [Getting Started](/guide/getting-started) | Install PreactPress and understand the starter structure |
|
|
86
|
+
| [Routing](/guide/routing) | Learn how files become URLs |
|
|
87
|
+
| [Deploy](/guide/deploy) | Build and publish a static site |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>PreactPress</title>
|
|
7
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
8
|
+
<link rel="icon" href="/favicon-32.png" type="image/png" sizes="32x32" />
|
|
9
|
+
<link rel="icon" href="/favicon.png" type="image/png" />
|
|
10
|
+
<link rel="apple-touch-icon" href="/favicon.png" />
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div id="app"></div>
|
|
14
|
+
<script type="module">
|
|
15
|
+
import 'preactpress/app'
|
|
16
|
+
</script>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: home
|
|
3
|
+
title: PreactPress
|
|
4
|
+
description: Build static documentation and content sites with Markdown, MDX, Vite, and Preact.
|
|
5
|
+
hero:
|
|
6
|
+
name: PreactPress
|
|
7
|
+
text: Static sites, written in Markdown
|
|
8
|
+
tagline: Use Vite and Preact when you need speed, static HTML, and optional interactive components.
|
|
9
|
+
actions:
|
|
10
|
+
- theme: brand
|
|
11
|
+
text: Get started
|
|
12
|
+
link: /guide/getting-started
|
|
13
|
+
- theme: alt
|
|
14
|
+
text: Configuration
|
|
15
|
+
link: /guide/configuration
|
|
16
|
+
features:
|
|
17
|
+
- icon: ⚡
|
|
18
|
+
title: Fast development
|
|
19
|
+
details: Vite-powered SSR, hot reload, and static production output.
|
|
20
|
+
- icon: MD
|
|
21
|
+
title: Markdown and MDX
|
|
22
|
+
details: Keep regular pages small and add Preact components only where needed.
|
|
23
|
+
- icon: ✓
|
|
24
|
+
title: Release checks
|
|
25
|
+
details: Validate routes, links, navigation, locales, and drafts before deployment.
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
PreactPress generates deployable HTML and assets. No Node server is required in production.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Interactive MDX
|
|
3
|
+
description: Markdown with imported Preact components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import Counter from './components/Counter.tsx'
|
|
7
|
+
|
|
8
|
+
## Preact component
|
|
9
|
+
|
|
10
|
+
MDX pages can import local Preact components and render them inline.
|
|
11
|
+
|
|
12
|
+
<Counter initial={3} />
|
|
13
|
+
|
|
14
|
+
## Image
|
|
15
|
+
|
|
16
|
+
Markdown images work like in `.md` pages:
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## YouTube
|
|
21
|
+
|
|
22
|
+
Embed with a normal JSX `iframe` (replace the video id with your own):
|
|
23
|
+
|
|
24
|
+
<iframe
|
|
25
|
+
width="560"
|
|
26
|
+
height="315"
|
|
27
|
+
src="https://www.youtube.com/embed/aqz-KE-bpKQ"
|
|
28
|
+
title="YouTube video example"
|
|
29
|
+
frameBorder="0"
|
|
30
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
31
|
+
allowFullScreen
|
|
32
|
+
/>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Markdown examples
|
|
3
|
+
description: Rendered examples of PreactPress Markdown extensions.
|
|
4
|
+
tags:
|
|
5
|
+
- markdown
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Code highlighting
|
|
9
|
+
|
|
10
|
+
```ts{2}
|
|
11
|
+
export function greet(name: string) {
|
|
12
|
+
return `Hello, ${name}!`
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Inline code such as `themeConfig.outline` uses the theme's code tokens.
|
|
17
|
+
|
|
18
|
+
## Snippet import
|
|
19
|
+
|
|
20
|
+
<<< @/snippets/greet.ts{2}
|
|
21
|
+
|
|
22
|
+
## Containers and alerts
|
|
23
|
+
|
|
24
|
+
::: tip
|
|
25
|
+
Custom containers support `tip`, `warning`, `danger`, `info`, and `details`.
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
> [!NOTE]
|
|
29
|
+
> GFM alert syntax is supported too.
|
|
30
|
+
|
|
31
|
+
## Table
|
|
32
|
+
|
|
33
|
+
| Source | Result |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `# Title` | Heading |
|
|
36
|
+
| YAML frontmatter | Page metadata |
|
|
37
|
+
|
|
38
|
+
## Stable heading {#stable-heading}
|
|
39
|
+
|
|
40
|
+
Use `{#id}` to control a heading fragment.
|
|
41
|
+
|
|
42
|
+
## Inline table of contents
|
|
43
|
+
|
|
44
|
+
[[toc]]
|
|
45
|
+
|
|
46
|
+
### Nested section
|
|
47
|
+
|
|
48
|
+
The generated table of contents includes level-three headings.
|
|
49
|
+
|
|
50
|
+
## Code group
|
|
51
|
+
|
|
52
|
+
::: code-group
|
|
53
|
+
|
|
54
|
+
```bash [pnpm]
|
|
55
|
+
pnpm add -D @kamod-ch/preactpress
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```bash [npm]
|
|
59
|
+
npm install --save-dev @kamod-ch/preactpress
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
:::
|
|
63
|
+
|
|
64
|
+
## Included content
|
|
65
|
+
|
|
66
|
+
<!--@include: @/partials/shared-note.md-->
|
|
67
|
+
|
|
68
|
+
## Emoji and math
|
|
69
|
+
|
|
70
|
+
This starter enables both options: :rocket:
|
|
71
|
+
|
|
72
|
+
Inline math: $E = mc^2$
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preactpress-docs-starter",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "preactpress dev",
|
|
7
|
+
"check": "preactpress check",
|
|
8
|
+
"build": "preactpress build",
|
|
9
|
+
"preview": "preactpress preview"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@kamod-ch/preactpress": "file:../..",
|
|
13
|
+
"typescript": "^5.8.3"
|
|
14
|
+
}
|
|
15
|
+
}
|