This name contins helpers for generating routes.
import { generateCommonRoutes } from "@quintype/framework/server/generate-routes";
Methods
# static generateCommonRoutes(config, domainSlug, opts) → {Array.<module:match-best-route~Route>}
This is used to generate all routes
Parameters:
Name | Type | Description |
---|---|---|
config |
Config
|
The config object |
domainSlug |
string
|
The domainSlug (undefined if this is the main domain) |
opts |
Object
|
|
allRoutes |
boolean
|
Generate all routes (default true) |
sectionPageRoutes |
boolean
|
Generate section page routes (default allRoutes) |
storyPageRoutes |
boolean
|
Generate story page routes (default allRoutes) |
homePageRoute |
boolean
|
Generate home page route (default allRoutes) |
skipPWA |
Object
|
|
skipPWA.story |
boolean
|
Skips PWA for story pages |
skipPWA.home |
boolean
|
Skips PWA for home pages |
skipPWA.section |
boolean
|
Skips PWA for section pages |
Array of created routes
Array.<module:match-best-route~Route>