Options
All
  • Public
  • Public/Protected
  • All
Menu

Plugin for working with routes and URL path formats.

Hierarchy

  • RouterPlugin

Implements

Index

Constructors

Properties

formatters: Record<string, Function>
pod: Pod

Methods

  • addPathFormatFunction(name: string, func: Function): void
  • Adds a path formatter function to make it available from a document or collection's $path setting.

    For example, if a document's $path is set to:

    $path: /blog/articles/${slugify(doc.fields.title)}/
    

    You could then add a path formatter with name slugify to create a URL for the document, based on its title field.

    Parameters

    • name: string
    • func: Function

    Returns void

  • updatePathFormatContextHook(context: Record<string, any>): void

Generated using TypeDoc