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 sued 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)

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

Array of created routes