Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including scan-md-confluence with all npm packages installed. Try it out:

var scanMdConfluence = require("scan-md-confluence")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

scan-md-confluence v0.1.7

A tool to scan all markdowns of a project and publish them automatically in Confluence.

Markdown scanner and Confluence importer

This project contains a NodeJs module that scans all markdowns of a specified directory recursively and imports them into Confluence as Confluence markup. The Confluence script can also be used to add labels to articles.

Getting started

Install scan-md-confluence via npm:

$ npm install scan-md-confluence

Usage

Markdown files

In order for markdowns to be processed by the scanner, corresponding markdowns must be supplemented with metadata.

For example in top of a markdown file:

<!--
title: My Markdown
labels: label1, label2, label3 
-->
Configuration
{
  "confluence": {
    "username": "username",
    "password": "password",
    "baseUrl":  "https://{company}.atlassian.net/wiki",
    "version": 3,
    "space": "myspace",
    "parentPageId": 123,
    "markDown": {
      "codeStyling": {
        "linenumbers": true,
        "theme": "RDark"
      },
      "codeLanguageMap": {
        "markdownLanguage": "confluenceLanguage"
      }
    }
  },
  "fileEncoding": "utf8",
  "scanDirectory": "/src/"
}
Run the script

Let the scan process start:

$ node scan-md-confluence --scan --config=./configuration.json 

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free