More (params, sourceDocsMenu, searchDB) private documon/src/more.js 32
xpath documon.More
file documon/src/more.js

Discovers, parses, converts markdown to HTML and injects menu with "more" docs.

Processes the "more" markdown folder by:

  • Building the menu to reflect the "more folder" directory structure.
  • Translates markdown into HTML
Parameters
params
object

The primary documon configuration documon.js::mainConf, which should contain:

params properties
moreQuirkDelimiter
object optional .

Set's the quirkDelimiter.

outputAssetsFolder
object

The asset folder to copy into the final documentation. The More pages may refer to assets outside of the template, such as css, images, etc.

moreFolder
object

The folder to process.

templateFolder
object

The path to the template folder.

outputFolder
object

THe destination folder.

gati
object

Your Google Analytics Tracking ID

sourceDocsMenu
object

The menu for the parsed source code documentation. We'll merge it into the "more" menu.

searchDB
object

The searchData (local to documon's run function, as generated by seeder ), we'll include our "more" docs for searching.

Returns menu | undefined

Serves 2 purposes, when returning undefined notifies callee that there aren't any "more" docs. Otherwise the modified menu is return with the original sourceDocsMenu either tacked onto the end of the "more" menu, or incorporated into the "more" menu at the "DOCS-GO-HERE" injection point.

Properties
docGoesHereStr
documon/src/more.js67
string private

The string used as the flag as to where to insert the parsed source documents into the menu.

flat
documon/src/more.js47
string private

A place to store generated page objects with a direct reference to their ID via flat[id].

metaRx
documon/src/more.js73
string private

The regular expression use to split the doc on the metaString

metaString
documon/src/more.js61
string

The delimiting string used to seperate the meta JSON from normal markdown.

quirkDelimiter
documon/src/more.js54
string private

Used to mark where filename numbering terminates and the "title" begins. User configurable via the moreQuirkDelimiter option.

Methods
cleanID (id, amFolder) private documon/src/more.js 192

Cleans the ID so the ID only contains lapha-numeric characters. Non-alphanumeric characters are translated into an underscore character.

Parameters
id
type

description

amFolder
type

description

Returns type

description description

init () documon/src/more.js 256

See class description.

newItem (url, amFolder) private documon/src/more.js 98

Opens, catalogs and builds a new page from the provided file path.

Parameters
url
string

The path to the markdown file.

amFolder
boolean

Process as a folder?

Returns object

An object containing structured data:

    {
          id
        , url // as originally provided 
        , label // Cleaned up (no numbering) filename
        , name : // same as label but the page.jst template needs the "name" property.
        , kind : // The CSS class used on the icon( amFolder ? "more-folder" : "more-file" )
        , amFolder : // is a folder?
        , basepath : // The parent folder.
        , parentID : // The parent's id (e.g.more.foo)
        , children : // Folders have a children array
    }
parseJSON (val) private documon/src/more.js 240

A safe replacement for standard JSON parsing that mitigates errors.

Parameters
val
string

val

Returns any
quirkyName (filename, amFolder) private documon/src/more.js 205

splits the numbering off of eight filename and returns the filename with out numbering

Parameters
filename
type

description

amFolder
type

description

Returns type

description description