Methods

(inner) getContext(basePath) → {object}

Create a context object with all information needed for the sync

Parameters:
NameTypeDefaultDescription
basePathstring.

Base path to resolve files

Returns:

The context object

Type: 
object

(inner) getPage(repo_url, title, pagePath, titlePrefix) → {LocalPage}

Creates LocalPage instances from the parameters

Parameters:
NameTypeDescription
repo_urlstring

Repository url

titlestring

Page title

pagePathstring

Page path

titlePrefixstring

Page title prefix

Returns:

The page created from the parameters

Type: 
LocalPage

(inner) loadConfig(basePath) → {object}

Loads an parses the 'mkdocs.yml' file

Parameters:
NameTypeDescription
basePathstring

the basepath to look for 'mkdocs.yml'

Returns:

with nav, repo_url, site_name attributes

Type: 
object

(inner) traverse(repo_url, nav, basePath, pages) → {Array.<LocalPage>}

Recursively traverses the nav object and adds LocalPages to pages array

Parameters:
NameTypeDescription
repo_urlstring

repo_url from 'mkdocs.yml'

nav*

nav object from 'mkdocs.yml'

basePath*

the basepath to resolve files

pagesArray.<LocalPage>
Returns:

The array with all pages from nav

Type: 
Array.<LocalPage>