Module

generate-routes

This name contins helpers for generating routes.

import { generateCommonRoutes } from "@quintype/framework/server/generate-routes";

View Source server/generate-routes.js, line 1

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

View Source server/generate-routes.js, line 133

Array of created routes