- Source
Methods
(inner) getContext(basePath) → {object}
Create a context object with all information needed for the sync
Parameters:
Name | Type | Default | Description |
---|---|---|---|
basePath | string | . | Base path to resolve files |
- Source
Returns:
The context object
- Type:
- object
(inner) getPage(repo_url, title, pagePath, titlePrefix) → {LocalPage}
Creates LocalPage
instances from the parameters
Parameters:
Name | Type | Description |
---|---|---|
repo_url | string | Repository url |
title | string | Page title |
pagePath | string | Page path |
titlePrefix | string | Page title prefix |
- Source
Returns:
The page created from the parameters
- Type:
- LocalPage
(inner) loadConfig(basePath) → {object}
Loads an parses the 'mkdocs.yml' file
Parameters:
Name | Type | Description |
---|---|---|
basePath | string | the basepath to look for 'mkdocs.yml' |
- Source
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 LocalPage
s to pages
array
Parameters:
Name | Type | Description |
---|---|---|
repo_url | string | repo_url from 'mkdocs.yml' |
nav | * | nav object from 'mkdocs.yml' |
basePath | * | the basepath to resolve files |
pages | Array.<LocalPage> |
- Source
Returns:
The array with all pages from nav
- Type:
- Array.<LocalPage>