@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
|
@@ -11,11 +11,11 @@ This guide shows how to create a PreactPress site, understand the generated file
|
|
|
11
11
|
|
|
12
12
|
You need:
|
|
13
13
|
|
|
14
|
-
| Requirement
|
|
15
|
-
|
|
|
16
|
-
| Node.js
|
|
17
|
-
| Package manager | pnpm recommended; npm, yarn, and bun also work
|
|
18
|
-
| Editor
|
|
14
|
+
| Requirement | Version |
|
|
15
|
+
| --------------- | ----------------------------------------------- |
|
|
16
|
+
| Node.js | 20 or higher |
|
|
17
|
+
| Package manager | pnpm recommended; npm, yarn, and bun also work |
|
|
18
|
+
| Editor | Any editor with Markdown and TypeScript support |
|
|
19
19
|
|
|
20
20
|
## Create a site
|
|
21
21
|
|
|
@@ -53,7 +53,6 @@ my-site/
|
|
|
53
53
|
├── README.md
|
|
54
54
|
├── index.html
|
|
55
55
|
├── index.md
|
|
56
|
-
├── about.md
|
|
57
56
|
├── guide/
|
|
58
57
|
│ └── first-five-minutes.md
|
|
59
58
|
├── markdown-examples.md
|
|
@@ -73,25 +72,25 @@ The starter config lives at `.preactpress/config.ts`:
|
|
|
73
72
|
```ts
|
|
74
73
|
export default {
|
|
75
74
|
site: {
|
|
76
|
-
title:
|
|
77
|
-
description:
|
|
75
|
+
title: "My Docs",
|
|
76
|
+
description: "Short summary for search and social previews",
|
|
78
77
|
},
|
|
79
78
|
themeConfig: {
|
|
80
79
|
nav: [
|
|
81
|
-
{ text:
|
|
82
|
-
{ text:
|
|
80
|
+
{ text: "Home", link: "/" },
|
|
81
|
+
{ text: "Guide", link: "/guide/what-is-preactpress" },
|
|
83
82
|
],
|
|
84
83
|
sidebar: [
|
|
85
84
|
{
|
|
86
|
-
text:
|
|
85
|
+
text: "Introduction",
|
|
87
86
|
items: [
|
|
88
|
-
{ text:
|
|
89
|
-
{ text:
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
}
|
|
87
|
+
{ text: "What is PreactPress?", link: "/guide/what-is-preactpress" },
|
|
88
|
+
{ text: "Getting Started", link: "/guide/getting-started" },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
};
|
|
95
94
|
```
|
|
96
95
|
|
|
97
96
|
Use `site` for site-wide metadata and `themeConfig` for default-theme options such as logo (`logo: '/logo.svg'`), nav, sidebar, search, outline, footer, and edit links.
|
|
@@ -102,7 +101,6 @@ PreactPress uses file-based routing. By default, the source directory is the pro
|
|
|
102
101
|
|
|
103
102
|
```text
|
|
104
103
|
index.md -> /
|
|
105
|
-
about.md -> /about
|
|
106
104
|
guide/getting-started.md -> /guide/getting-started
|
|
107
105
|
interactive.mdx -> /interactive
|
|
108
106
|
```
|
|
@@ -111,8 +109,8 @@ You can change the source directory with `srcDir`:
|
|
|
111
109
|
|
|
112
110
|
```ts
|
|
113
111
|
export default {
|
|
114
|
-
srcDir:
|
|
115
|
-
}
|
|
112
|
+
srcDir: "docs",
|
|
113
|
+
};
|
|
116
114
|
```
|
|
117
115
|
|
|
118
116
|
With this config, PreactPress reads pages from `docs/` while `.preactpress/config.ts` still belongs to the project root.
|
|
@@ -121,12 +119,12 @@ With this config, PreactPress reads pages from `docs/` while `.preactpress/confi
|
|
|
121
119
|
|
|
122
120
|
The starter includes npm scripts:
|
|
123
121
|
|
|
124
|
-
| Command
|
|
125
|
-
|
|
|
126
|
-
| `pnpm run dev`
|
|
127
|
-
| `pnpm run check`
|
|
128
|
-
| `pnpm run build`
|
|
129
|
-
| `pnpm run preview` | Preview the production build locally
|
|
122
|
+
| Command | Purpose |
|
|
123
|
+
| ------------------ | --------------------------------------------- |
|
|
124
|
+
| `pnpm run dev` | Start the dev server with SSR and hot reload |
|
|
125
|
+
| `pnpm run check` | Validate config, routes, and links |
|
|
126
|
+
| `pnpm run build` | Build the static production site into `dist/` |
|
|
127
|
+
| `pnpm run preview` | Preview the production build locally |
|
|
130
128
|
|
|
131
129
|
You can also call the CLI directly:
|
|
132
130
|
|
|
@@ -139,8 +137,8 @@ pnpm exec preactpress preview
|
|
|
139
137
|
|
|
140
138
|
## What's next?
|
|
141
139
|
|
|
142
|
-
| Page
|
|
143
|
-
|
|
|
140
|
+
| Page | Why |
|
|
141
|
+
| ------------------------------------------------- | ------------------------------------------------- |
|
|
144
142
|
| [Your first 5 minutes](/guide/first-five-minutes) | Change the title, add a page, and wire navigation |
|
|
145
|
-
| [Routing](/guide/routing)
|
|
146
|
-
| [Deploy](/guide/deploy)
|
|
143
|
+
| [Routing](/guide/routing) | Learn how Markdown files map to URLs |
|
|
144
|
+
| [Deploy](/guide/deploy) | Build and publish the generated `dist/` directory |
|
|
@@ -60,8 +60,8 @@ You can move content into a nested source directory with `srcDir`:
|
|
|
60
60
|
|
|
61
61
|
```ts
|
|
62
62
|
export default {
|
|
63
|
-
srcDir:
|
|
64
|
-
}
|
|
63
|
+
srcDir: "docs",
|
|
64
|
+
};
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
That produces this shape:
|
|
@@ -97,6 +97,7 @@ Avoid linking directly to generated HTML or source Markdown:
|
|
|
97
97
|
|
|
98
98
|
```md
|
|
99
99
|
<!-- Avoid -->
|
|
100
|
+
|
|
100
101
|
[Getting Started](/guide/getting-started.md)
|
|
101
102
|
[Getting Started](/guide/getting-started.html)
|
|
102
103
|
```
|
|
@@ -120,16 +121,16 @@ Configure locale labels, language codes, and locale-specific nav in `.preactpres
|
|
|
120
121
|
export default {
|
|
121
122
|
locales: {
|
|
122
123
|
root: {
|
|
123
|
-
label:
|
|
124
|
-
lang:
|
|
124
|
+
label: "English",
|
|
125
|
+
lang: "en",
|
|
125
126
|
},
|
|
126
127
|
de: {
|
|
127
|
-
label:
|
|
128
|
-
lang:
|
|
129
|
-
link:
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
128
|
+
label: "Deutsch",
|
|
129
|
+
lang: "de",
|
|
130
|
+
link: "/de/",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
};
|
|
133
134
|
```
|
|
134
135
|
|
|
135
136
|
The default theme shows a language switcher when multiple locales are configured.
|
|
@@ -167,9 +168,9 @@ Use `site.base` when the site is served from a subpath, for example GitHub Pages
|
|
|
167
168
|
```ts
|
|
168
169
|
export default {
|
|
169
170
|
site: {
|
|
170
|
-
base:
|
|
171
|
-
}
|
|
172
|
-
}
|
|
171
|
+
base: "/my-repo/",
|
|
172
|
+
},
|
|
173
|
+
};
|
|
173
174
|
```
|
|
174
175
|
|
|
175
176
|
You can also override it for one build:
|
|
@@ -185,25 +186,25 @@ Map a public URL to existing content without duplicating files:
|
|
|
185
186
|
```ts
|
|
186
187
|
export default {
|
|
187
188
|
rewrites: {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
}
|
|
189
|
+
"/docs": "/guide",
|
|
190
|
+
"/getting-started": "/guide/intro",
|
|
191
|
+
},
|
|
192
|
+
};
|
|
192
193
|
```
|
|
193
194
|
|
|
194
195
|
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
|
|
|
196
197
|
## Clean URLs and hosting
|
|
197
198
|
|
|
198
|
-
| `cleanUrls`
|
|
199
|
-
|
|
|
199
|
+
| `cleanUrls` | Output for `/about` | Typical host |
|
|
200
|
+
| ---------------- | ----------------------- | ----------------------------------------------- |
|
|
200
201
|
| `true` (default) | `dist/about/index.html` | Netlify, Vercel, Cloudflare Pages, GitHub Pages |
|
|
201
|
-
| `false`
|
|
202
|
+
| `false` | `dist/about.html` | Static buckets without directory index support |
|
|
202
203
|
|
|
203
204
|
```ts
|
|
204
205
|
export default {
|
|
205
|
-
cleanUrls: false
|
|
206
|
-
}
|
|
206
|
+
cleanUrls: false,
|
|
207
|
+
};
|
|
207
208
|
```
|
|
208
209
|
|
|
209
210
|
Most modern static hosts work with the default. Set `cleanUrls: false` only when your host cannot resolve `/about` to `about/index.html`.
|
|
@@ -213,10 +214,9 @@ Most modern static hosts work with the default. Set `cleanUrls: false` only when
|
|
|
213
214
|
Generate routes at build time with a bracket template and a colocated `.paths.ts` file:
|
|
214
215
|
|
|
215
216
|
```md
|
|
216
|
-
<!-- packages/[pkg].md -->
|
|
217
|
-
|
|
218
|
-
title: "{{ params.pkg }}"
|
|
219
|
-
---
|
|
217
|
+
## <!-- packages/[pkg].md -->
|
|
218
|
+
|
|
219
|
+
## title: "{{ params.pkg }}"
|
|
220
220
|
|
|
221
221
|
# {{ params.pkg }}
|
|
222
222
|
```
|
|
@@ -226,11 +226,11 @@ title: "{{ params.pkg }}"
|
|
|
226
226
|
export default {
|
|
227
227
|
paths() {
|
|
228
228
|
return [
|
|
229
|
-
{ params: { pkg:
|
|
230
|
-
{ params: { pkg:
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
}
|
|
229
|
+
{ params: { pkg: "preact" } },
|
|
230
|
+
{ params: { pkg: "vite" }, props: { note: "Build tool" } },
|
|
231
|
+
];
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
This emits `/packages/preact` and `/packages/vite`. Use `{{ params.key }}` and `{{ props.key }}` in frontmatter and body.
|
|
@@ -241,23 +241,23 @@ Colocate `*.data.ts` with a page to load build-time data via `createContentLoade
|
|
|
241
241
|
|
|
242
242
|
```ts
|
|
243
243
|
// blog.data.ts
|
|
244
|
-
import { createContentLoader } from
|
|
244
|
+
import { createContentLoader } from "@kamod-ch/preactpress/config";
|
|
245
245
|
|
|
246
|
-
export default createContentLoader(
|
|
246
|
+
export default createContentLoader("posts/*.md", {
|
|
247
247
|
transform(items) {
|
|
248
248
|
return items.map((item) => ({
|
|
249
249
|
title: item.title,
|
|
250
|
-
route: item.route
|
|
251
|
-
}))
|
|
252
|
-
}
|
|
253
|
-
})
|
|
250
|
+
route: item.route,
|
|
251
|
+
}));
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
Pair with `blog.md` or `blog/index.md` for route `/blog`.
|
|
257
257
|
|
|
258
258
|
## Current limitations
|
|
259
259
|
|
|
260
|
-
| Feature
|
|
261
|
-
|
|
|
260
|
+
| Feature | Status |
|
|
261
|
+
| ---------------------------------- | ----------------------------------- |
|
|
262
262
|
| Dynamic MDX templates (`[id].mdx`) | Not supported (use `.md` templates) |
|
|
263
|
-
| Pattern-based rewrites with params | Not supported
|
|
263
|
+
| Pattern-based rewrites with params | Not supported |
|
|
@@ -36,18 +36,18 @@ The separate `preactpress-examples` project includes a custom-theme example that
|
|
|
36
36
|
|
|
37
37
|
PreactPress focuses on keeping content work simple:
|
|
38
38
|
|
|
39
|
-
| Feature
|
|
40
|
-
|
|
|
41
|
-
| Vite dev server
|
|
39
|
+
| Feature | What it gives you |
|
|
40
|
+
| -------------------- | ------------------------------------------------------------------ |
|
|
41
|
+
| Vite dev server | Fast startup and hot updates while editing content |
|
|
42
42
|
| Markdown frontmatter | Page titles, descriptions, tags, draft status, and social metadata |
|
|
43
|
-
| MDX
|
|
44
|
-
| Default theme
|
|
45
|
-
| `preactpress check`
|
|
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
46
|
|
|
47
47
|
For regular content, use `.md`. When a page needs interactivity, use `.mdx` and import a Preact component:
|
|
48
48
|
|
|
49
49
|
```mdx
|
|
50
|
-
import Counter from
|
|
50
|
+
import Counter from "./components/Counter.tsx";
|
|
51
51
|
|
|
52
52
|
## Demo
|
|
53
53
|
|
|
@@ -62,13 +62,13 @@ After hydration, client-side navigation takes over. Markdown pages are loaded as
|
|
|
62
62
|
|
|
63
63
|
The production output is static files only:
|
|
64
64
|
|
|
65
|
-
| Output
|
|
66
|
-
|
|
|
67
|
-
| `index.html`, `*/index.html` | One HTML file per route
|
|
68
|
-
| `assets/*`
|
|
69
|
-
| `preactpress-search.json`
|
|
70
|
-
| `preactpress-content/*.json` | Lazy-loaded Markdown page payloads
|
|
71
|
-
| `404.html`
|
|
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
72
|
|
|
73
73
|
## What about VitePress?
|
|
74
74
|
|
|
@@ -80,8 +80,8 @@ PreactPress is also static-only in production. You build the site once, upload t
|
|
|
80
80
|
|
|
81
81
|
## Next steps
|
|
82
82
|
|
|
83
|
-
| Page
|
|
84
|
-
|
|
|
83
|
+
| Page | Why |
|
|
84
|
+
| ----------------------------------------- | -------------------------------------------------------- |
|
|
85
85
|
| [Getting Started](/guide/getting-started) | Install PreactPress and understand the starter structure |
|
|
86
|
-
| [Routing](/guide/routing)
|
|
87
|
-
| [Deploy](/guide/deploy)
|
|
86
|
+
| [Routing](/guide/routing) | Learn how files become URLs |
|
|
87
|
+
| [Deploy](/guide/deploy) | Build and publish a static site |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: home
|
|
3
|
+
title: PreactPress
|
|
4
|
+
description: The documentation framework for Preact.
|
|
5
|
+
sidebar: false
|
|
6
|
+
pageClass: pp-mkt-page
|
|
7
|
+
markdownStyles: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
import "./components/marketing.css";
|
|
11
|
+
import BenefitsGrid from "./components/BenefitsGrid.tsx";
|
|
12
|
+
import CliBlock from "./components/CliBlock.tsx";
|
|
13
|
+
import ComparisonTable from "./components/ComparisonTable.tsx";
|
|
14
|
+
import MarketingHero from "./components/MarketingHero.tsx";
|
|
15
|
+
import MdxDemo from "./components/MdxDemo.tsx";
|
|
16
|
+
import References from "./components/References.tsx";
|
|
17
|
+
import TemplateGallery from "./components/TemplateGallery.tsx";
|
|
18
|
+
|
|
19
|
+
<MarketingHero />
|
|
20
|
+
<CliBlock />
|
|
21
|
+
<MdxDemo />
|
|
22
|
+
<BenefitsGrid />
|
|
23
|
+
<TemplateGallery />
|
|
24
|
+
<ComparisonTable />
|
|
25
|
+
<References />
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Markdown examples
|
|
3
|
-
description:
|
|
3
|
+
description: Common authoring snippets and rendered PreactPress Markdown extensions.
|
|
4
4
|
tags:
|
|
5
5
|
- markdown
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
## Code
|
|
8
|
+
## Code
|
|
9
9
|
|
|
10
10
|
```ts{2}
|
|
11
11
|
export function greet(name: string) {
|
|
@@ -13,43 +13,87 @@ export function greet(name: string) {
|
|
|
13
13
|
}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Highlight a single line with fence meta (`{2}`) or inline notation:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
export function greet(name: string) {
|
|
20
|
+
return `Hello, ${name}!`; // [!code highlight]
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Inline code like `themeConfig.outline` uses the same theme tokens as code blocks.
|
|
17
25
|
|
|
18
26
|
## Snippet import
|
|
19
27
|
|
|
28
|
+
Reuse source files instead of duplicating code:
|
|
29
|
+
|
|
20
30
|
<<< @/snippets/greet.ts{2}
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
The `@/` prefix resolves from the site content root (`srcDir`).
|
|
33
|
+
|
|
34
|
+
## Links
|
|
35
|
+
|
|
36
|
+
[Home](/) · [External link](https://preactjs.com)
|
|
37
|
+
|
|
38
|
+
## Tables
|
|
39
|
+
|
|
40
|
+
| Syntax | Result |
|
|
41
|
+
| ----------------- | ------------- |
|
|
42
|
+
| `# Title` | Heading |
|
|
43
|
+
| `---` frontmatter | Page metadata |
|
|
44
|
+
|
|
45
|
+
## Containers
|
|
46
|
+
|
|
47
|
+
:::: tip
|
|
48
|
+
`::: tip`, `::: warning`, `::: danger`, `::: info`, and `::: details` work like VitePress custom containers.
|
|
49
|
+
::::
|
|
23
50
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
51
|
+
:::: warning Optional title
|
|
52
|
+
You can pass a custom title after the container type.
|
|
53
|
+
::::
|
|
54
|
+
|
|
55
|
+
:::: details Learn more
|
|
56
|
+
Details blocks render as native `<details>` elements.
|
|
57
|
+
::::
|
|
58
|
+
|
|
59
|
+
## GFM alerts
|
|
60
|
+
|
|
61
|
+
GitHub-flavored alert syntax renders with the same styling as custom containers:
|
|
27
62
|
|
|
28
63
|
> [!NOTE]
|
|
29
|
-
>
|
|
64
|
+
> Useful information that readers should know.
|
|
65
|
+
|
|
66
|
+
> [!TIP]
|
|
67
|
+
> Optional advice for doing things more easily.
|
|
68
|
+
|
|
69
|
+
> [!WARNING]
|
|
70
|
+
> Critical content that needs immediate attention.
|
|
71
|
+
|
|
72
|
+
## Custom heading IDs
|
|
30
73
|
|
|
31
|
-
##
|
|
74
|
+
## Stable links {#stable-id}
|
|
32
75
|
|
|
33
|
-
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| `# Title` | Heading |
|
|
36
|
-
| YAML frontmatter | Page metadata |
|
|
76
|
+
Append `{#id}` to any heading to control its anchor.
|
|
37
77
|
|
|
38
|
-
##
|
|
78
|
+
## Emoji
|
|
39
79
|
|
|
40
|
-
|
|
80
|
+
PreactPress supports `:tada:` and `:rocket:` shortcodes out of the box.
|
|
41
81
|
|
|
42
82
|
## Inline table of contents
|
|
43
83
|
|
|
44
84
|
[[toc]]
|
|
45
85
|
|
|
46
|
-
###
|
|
86
|
+
### First section
|
|
47
87
|
|
|
48
|
-
|
|
88
|
+
Content below the inline TOC.
|
|
49
89
|
|
|
50
|
-
|
|
90
|
+
### Second section
|
|
51
91
|
|
|
52
|
-
|
|
92
|
+
Nested heading for the outline.
|
|
93
|
+
|
|
94
|
+
## Code groups
|
|
95
|
+
|
|
96
|
+
:::: code-group
|
|
53
97
|
|
|
54
98
|
```bash [pnpm]
|
|
55
99
|
pnpm add -D @kamod-ch/preactpress
|
|
@@ -59,9 +103,17 @@ pnpm add -D @kamod-ch/preactpress
|
|
|
59
103
|
npm install --save-dev @kamod-ch/preactpress
|
|
60
104
|
```
|
|
61
105
|
|
|
62
|
-
|
|
106
|
+
::::
|
|
107
|
+
|
|
108
|
+
## Markdown inclusion
|
|
109
|
+
|
|
110
|
+
Use includes for shared fragments or selected line ranges:
|
|
111
|
+
|
|
112
|
+
<!--@include: @/parts/include-body.md{5,6}-->
|
|
113
|
+
|
|
114
|
+
## Markdown includes
|
|
63
115
|
|
|
64
|
-
|
|
116
|
+
Reuse shared fragments with HTML comments:
|
|
65
117
|
|
|
66
118
|
<!--@include: @/partials/shared-note.md-->
|
|
67
119
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "{{ props.name }}"
|
|
3
|
+
description: "Dynamic route example for {{ props.name }}."
|
|
4
|
+
tags:
|
|
5
|
+
- examples
|
|
6
|
+
- dynamic-routes
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {{ props.name }}
|
|
10
|
+
|
|
11
|
+
This page is generated from `packages/[pkg].md` and `packages/[pkg].paths.ts`.
|
|
12
|
+
|
|
13
|
+
Package slug: `{{ params.pkg }}`
|
|
14
|
+
|
|
15
|
+
{{ props.summary }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
paths() {
|
|
3
|
+
return [
|
|
4
|
+
{
|
|
5
|
+
params: { pkg: "preactpress" },
|
|
6
|
+
props: {
|
|
7
|
+
name: "PreactPress",
|
|
8
|
+
summary: "The documentation framework package rendered as a static dynamic route.",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
params: { pkg: "preact" },
|
|
13
|
+
props: {
|
|
14
|
+
name: "Preact",
|
|
15
|
+
summary: "A second route proves that one template can render multiple static pages.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -12,8 +12,8 @@ importers:
|
|
|
12
12
|
specifier: file:../..
|
|
13
13
|
version: file:../..(@babel/core@7.29.7)(rollup@4.61.1)
|
|
14
14
|
typescript:
|
|
15
|
-
specifier: ^
|
|
16
|
-
version:
|
|
15
|
+
specifier: ^6.0.3
|
|
16
|
+
version: 6.0.3
|
|
17
17
|
|
|
18
18
|
packages:
|
|
19
19
|
|
|
@@ -1234,8 +1234,8 @@ packages:
|
|
|
1234
1234
|
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
|
|
1235
1235
|
engines: {node: '>=16'}
|
|
1236
1236
|
|
|
1237
|
-
typescript@
|
|
1238
|
-
resolution: {integrity: sha512-
|
|
1237
|
+
typescript@6.0.3:
|
|
1238
|
+
resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
|
|
1239
1239
|
engines: {node: '>=14.17'}
|
|
1240
1240
|
hasBin: true
|
|
1241
1241
|
|
|
@@ -2833,7 +2833,7 @@ snapshots:
|
|
|
2833
2833
|
|
|
2834
2834
|
type-fest@4.41.0: {}
|
|
2835
2835
|
|
|
2836
|
-
typescript@
|
|
2836
|
+
typescript@6.0.3: {}
|
|
2837
2837
|
|
|
2838
2838
|
uc.micro@2.1.0: {}
|
|
2839
2839
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This file comes from templates/docs/public and is copied to dist/preactpress-example.txt.
|