models/local-page~ LocalPage

Models a (markdown) page found in the local repo

Constructor

new LocalPage()

Members

attachmentFiles :Array.<string>

Array of rendered attachment files

Type:
  • Array.<string>

attachments :Array.<Attachment>

Attachments on this page

Type:
  • Array.<Attachment>

html :string

Html markup

Type:
  • string

parentPageId :number

The id of the parent confluence page

Type:
  • number

Methods

loadMarkdown() → {string}

Loads the markdown file from this.meta.path

Returns:

The contents of the markdown file

Type: 
string

(async) render(renderer) → {LocalPage}

Render the markdown of this page and attachments, using the provided renderer

Parameters:
NameTypeDescription
rendererAssetRenderer

an AssetRenderer instance

Returns:

this with html and attachments populated

Type: 
LocalPage

(async) renderAttachments(renderer)

Render attachments of this page

Parameters:
NameTypeDescription
rendererAssetRenderer

an AssetRenderer instance

(async) sync(renderer, confluence) → {Promise.<RemotePage>}

Render and create this page to Confluence, including any attachments

Parameters:
NameTypeDescription
rendererAssetRenderer

an AssetRenderer instance

confluenceConfluenceSdk

ConfluenceSdk instance to use for syncing

Returns:

The RemotePage created

Type: 
Promise.<RemotePage>