Edit this topic

Documentation path mapper

: shell

: id-to-path-map

: documentation

: /modules/core/documentation/services/documentation-path-mapper.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/documentation/services/documentation-path-mapper.js

class: DocumentationPathMapper

new DocumentationPathMapper()

Maps documentation topic ids onto the relevant file, in the right module.

documentationPathMapper.mapIdToPath(root, id) ⇒ Array.<string>

Maps documentation topic ids onto the relevant file, in the right module.

Returns: Array.<string> - The list of possible paths for a file describing the topic.

Param Type Description
root string The content root for documentation (anything other than 'doc' will be ignored).
id string The topic's id. If top-level, that is the name of the documentation file, without extension. If it's a module top-level documentation topic, it's [module-technical-name]/[topic-filename-without-extension]. If it's in a top-level section, it's [section-folder-name]/[topic-filename-without-extension]. If it's in a section under a module, it's [module-technical-name]/[section-folder-name]/[topic-filename-without-extension].