Documentation route handler
: shell
: documentation
: middleware
: /modules/core/documentation/services/documentation-route-handler.js
DocumentationRouteHandler
This handler registers itself as an Express middleware that handles a catchall route under /docs/* with a normal priority, for documentation content items.
Kind: global variable
DocumentationRouteHandler.register(scope, context)
Registers the documentation middleware.
Kind: static method of DocumentationRouteHandler
Param | Type | Description |
---|---|---|
scope | object |
The scope. |
context | object |
The context. |
context.expressApp | object |
The Express application object. |
DocumentationRouteHandler.getUrl(id) ⇒ string
Gets the URL for a documentation topic (id prefix 'docs:').
Kind: static method of DocumentationRouteHandler
Returns: string
- The URL for the topic.
Param | Type | Description |
---|---|---|
id | string |
The topic content item's id. |
DocumentationRouteHandler.getId(url)
Gets the ID for a url, or null if not resolved.
Kind: static method of DocumentationRouteHandler
Param | Type | Description |
---|---|---|
url | string |
the URL to resolve. |