Skip to content

Commit 749bb07

Browse files
committed
chore(router): rename 'static/' to 'ssg/' for clarity
1 parent a5c8834 commit 749bb07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+525
-490
lines changed

packages/docs/src/routes/api/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import qwikRouterMiddlewareNetlifyEdgeApiData from './qwik-router-middleware-net
1010
import qwikRouterMiddlewareNodeApiData from './qwik-router-middleware-node/api.json';
1111
import qwikRouterMiddlewareRequestHandlerApiData from './qwik-router-middleware-request-handler/api.json';
1212
import qwikRouterMiddlewareVercelEdgeApiData from './qwik-router-middleware-vercel-edge/api.json';
13-
import qwikRouterStaticApiData from './qwik-router-static/api.json';
13+
import qwikRouterSsgApiData from './qwik-router-ssg/api.json';
1414
import qwikRouterViteAzureSwaApiData from './qwik-router-vite-azure-swa/api.json';
1515
import qwikRouterViteCloudRunApiData from './qwik-router-vite-cloud-run/api.json';
1616
import qwikRouterViteCloudflarePagesApiData from './qwik-router-vite-cloudflare-pages/api.json';
1717
import qwikRouterViteNetlifyEdgeApiData from './qwik-router-vite-netlify-edge/api.json';
1818
import qwikRouterViteNodeServerApiData from './qwik-router-vite-node-server/api.json';
19-
import qwikRouterViteStaticApiData from './qwik-router-vite-static/api.json';
19+
import qwikRouterViteSsgApiData from './qwik-router-vite-ssg/api.json';
2020
import qwikRouterViteVercelApiData from './qwik-router-vite-vercel/api.json';
2121
import qwikRouterApiData from './qwik-router/api.json';
2222
import qwikServerApiData from './qwik-server/api.json';
@@ -35,13 +35,13 @@ const apiData = {
3535
'qwik-router-middleware-request-handler': qwikRouterMiddlewareRequestHandlerApiData,
3636
'qwik-router-middleware-vercel-edge': qwikRouterMiddlewareVercelEdgeApiData,
3737
'qwik-router-middleware-firebase': qwikRouterMiddlewareFirebaseApiData,
38-
'qwik-router-static': qwikRouterStaticApiData,
38+
'qwik-router-ssg': qwikRouterSsgApiData,
3939
'qwik-router-vite-azure-swa': qwikRouterViteAzureSwaApiData,
4040
'qwik-router-vite-cloud-run': qwikRouterViteCloudRunApiData,
4141
'qwik-router-vite-cloudflare-pages': qwikRouterViteCloudflarePagesApiData,
4242
'qwik-router-vite-node-server': qwikRouterViteNodeServerApiData,
4343
'qwik-router-vite-netlify-edge': qwikRouterViteNetlifyEdgeApiData,
44-
'qwik-router-vite-static': qwikRouterViteStaticApiData,
44+
'qwik-router-vite-ssg': qwikRouterViteSsgApiData,
4545
'qwik-router-vite-vercel': qwikRouterViteVercelApiData,
4646
'qwik-optimizer': qwikOptimizerApiData,
4747
'qwik-server': qwikServerApiData,
@@ -126,7 +126,7 @@ export const ApiMemberWrapper = component$(({ id, data, filters }: any) => {
126126
<h2
127127
data-icon={isCollapsed.value ? '→' : '↓'}
128128
class="section-title cursor-pointer"
129-
onClick$={(e) => isCollapsed.value = !isCollapsed.value }
129+
onClick$={() => isCollapsed.value = !isCollapsed.value }
130130
>
131131
<span>{data.id}</span>
132132
</h2>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"id": "qwik-router-ssg",
3+
"package": "@qwik.dev/qwik-router/ssg",
4+
"members": [
5+
{
6+
"name": "generate",
7+
"id": "generate",
8+
"hierarchy": [
9+
{
10+
"name": "generate",
11+
"id": "generate"
12+
}
13+
],
14+
"kind": "Function",
15+
"content": "Use this function when SSG should be generated from another module, such as a Vite plugin. This function's should be passed the paths of the entry module and Qwik Router Plan.\n\n\n```typescript\nexport declare function generate(opts: SsgOptions): Promise<SsgResult>;\n```\n\n\n<table><thead><tr><th>\n\nParameter\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\nopts\n\n\n</td><td>\n\n[SsgOptions](#staticgenerateoptions)\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>\n**Returns:**\n\nPromise&lt;[SsgResult](#staticgenerateresult)<!-- -->&gt;",
16+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/ssg/index.ts",
17+
"mdFile": "router.generate.md"
18+
},
19+
{
20+
"name": "SsgRenderOptions",
21+
"id": "ssgrenderoptions",
22+
"hierarchy": [
23+
{
24+
"name": "SsgRenderOptions",
25+
"id": "ssgrenderoptions"
26+
}
27+
],
28+
"kind": "Interface",
29+
"content": "```typescript\nexport interface SsgRenderOptions extends RenderOptions \n```\n**Extends:** RenderOptions\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[emit404Pages?](./router.ssgrenderoptions.emit404pages.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Set to `false` if the static build should not write custom or default `404.html` pages. Defaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[emitData?](./router.ssgrenderoptions.emitdata.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Set to `false` if the generated `q-data.json` data files should not be written to disk. Defaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[emitHtml?](./router.ssgrenderoptions.emithtml.md)\n\n\n</td><td>\n\n\n</td><td>\n\nboolean\n\n\n</td><td>\n\n_(Optional)_ Set to `false` if the generated static HTML files should not be written to disk. Setting to `false` is useful if the SSG should only write the `q-data.json` files to disk. Defaults to `true`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[exclude?](./router.ssgrenderoptions.exclude.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ Defines file system routes relative to the source `routes` directory that should not be static generated. Accepts wildcard behavior. This should not include the \"base\" pathname. `exclude` always takes priority over `include`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[include?](./router.ssgrenderoptions.include.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n_(Optional)_ Defines file system routes relative to the source `routes` directory that should be static generated. Accepts wildcard behavior. This should not include the \"base\" pathname. If not provided, all routes will be static generated. `exclude` always takes priority over `include`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[log?](./router.ssgrenderoptions.log.md)\n\n\n</td><td>\n\n\n</td><td>\n\n'debug'\n\n\n</td><td>\n\n_(Optional)_ Log level.\n\n\n</td></tr>\n<tr><td>\n\n[maxTasksPerWorker?](./router.ssgrenderoptions.maxtasksperworker.md)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n_(Optional)_ Maximum number of tasks to be running at one time per worker. Defaults to `20`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[maxWorkers?](./router.ssgrenderoptions.maxworkers.md)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n_(Optional)_ Maximum number of workers to use while generating the static pages. Defaults to the number of CPUs available.\n\n\n</td></tr>\n<tr><td>\n\n[origin](./router.ssgrenderoptions.origin.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nThe URL `origin`<!-- -->, which is a combination of the scheme (protocol) and hostname (domain). For example, `https://qwik.dev` has the protocol `https://` and domain `qwik.dev`<!-- -->. However, the `origin` does not include a `pathname`<!-- -->.\n\nThe `origin` is used to provide a full URL during Static Site Generation (SSG), and to simulate a complete URL rather than just the `pathname`<!-- -->. For example, in order to render a correct canonical tag URL or URLs within the `sitemap.xml`<!-- -->, the `origin` must be provided too.\n\nIf the site also starts with a pathname other than `/`<!-- -->, please use the `basePathname` option in the Qwik Router config options.\n\n\n</td></tr>\n<tr><td>\n\n[outDir](./router.ssgrenderoptions.outdir.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nFile system directory where the static files should be written.\n\n\n</td></tr>\n<tr><td>\n\n[sitemapOutFile?](./router.ssgrenderoptions.sitemapoutfile.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring \\| null\n\n\n</td><td>\n\n_(Optional)_ File system path to write the `sitemap.xml` to. Defaults to `sitemap.xml` and written to the root of the `outDir`<!-- -->. Setting to `null` will prevent the sitemap from being created.\n\n\n</td></tr>\n</tbody></table>",
30+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/ssg/types.ts",
31+
"mdFile": "router.ssgrenderoptions.md"
32+
},
33+
{
34+
"name": "StaticGenerateOptions",
35+
"id": "staticgenerateoptions",
36+
"hierarchy": [
37+
{
38+
"name": "StaticGenerateOptions",
39+
"id": "staticgenerateoptions"
40+
}
41+
],
42+
"kind": "Interface",
43+
"content": "```typescript\nexport interface SsgOptions extends SsgRenderOptions \n```\n**Extends:** [SsgRenderOptions](#ssgrenderoptions)\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[basePathname?](./router.staticgenerateoptions.basepathname.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n_(Optional)_ Defaults to `/`\n\n\n</td></tr>\n<tr><td>\n\n[qwikCityPlanModulePath?](./router.staticgenerateoptions.qwikcityplanmodulepath.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n<tr><td>\n\n[qwikRouterConfigModulePath](./router.staticgenerateoptions.qwikrouterconfigmodulepath.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nPath to the Qwik Router Config module exporting the default `@qwik-router-config`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[renderModulePath](./router.staticgenerateoptions.rendermodulepath.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\nPath to the SSR module exporting the default render function. In most cases it'll be `./src/entry.ssr.tsx`<!-- -->.\n\n\n</td></tr>\n<tr><td>\n\n[rootDir?](./router.staticgenerateoptions.rootdir.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\n\n\n</td><td>\n\n_(Optional)_\n\n\n</td></tr>\n</tbody></table>",
44+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/ssg/types.ts",
45+
"mdFile": "router.staticgenerateoptions.md"
46+
},
47+
{
48+
"name": "StaticGenerateResult",
49+
"id": "staticgenerateresult",
50+
"hierarchy": [
51+
{
52+
"name": "StaticGenerateResult",
53+
"id": "staticgenerateresult"
54+
}
55+
],
56+
"kind": "Interface",
57+
"content": "```typescript\nexport interface SsgResult \n```\n\n\n<table><thead><tr><th>\n\nProperty\n\n\n</th><th>\n\nModifiers\n\n\n</th><th>\n\nType\n\n\n</th><th>\n\nDescription\n\n\n</th></tr></thead>\n<tbody><tr><td>\n\n[duration](./router.staticgenerateresult.duration.md)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[errors](./router.staticgenerateresult.errors.md)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[rendered](./router.staticgenerateresult.rendered.md)\n\n\n</td><td>\n\n\n</td><td>\n\nnumber\n\n\n</td><td>\n\n\n</td></tr>\n<tr><td>\n\n[staticPaths](./router.staticgenerateresult.staticpaths.md)\n\n\n</td><td>\n\n\n</td><td>\n\nstring\\[\\]\n\n\n</td><td>\n\n\n</td></tr>\n</tbody></table>",
58+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik-router/src/ssg/types.ts",
59+
"mdFile": "router.staticgenerateresult.md"
60+
}
61+
]
62+
}

0 commit comments

Comments
 (0)