Skip to content

farbodsz/pandoc-confluence

Repository files navigation

Pandoc Confluence Writer

Custom Pandoc writer for Confluence's XHTML-based storage format.

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Motivation

Writing documentation in Confluence can be a slow and painful process. It would be nice if we could simply use a Markdown file to upload to Confluence.

Confluence stores data primarily using a custom XHTML-based storage format, and pages can be created/updated/deleted using the Confluence REST API.

Writing XHTML by hand is obviously impractical, but writing Markdown is fun. With a way to convert from Markdown to Confluence's XHTML, we would be able to develop another process to publish the output file to a Confluence page.

Features

  • Inline text
    • Standard formatting (bold/italic)
    • JIRAs
    • User mentions
  • Block text
    • Note/info/tip/warning boxes
    • Expandable text block
    • Confluence macros (status badge, table of contents, cheese)
    • Standard code blocks
    • Code blocks with custom options
  • Images
    • Images
    • Image attributes
  • Links
    • To another Confluence page
    • To an attachment
    • To an external site
    • To an anchor (same page)
    • With embedded image as body
    • Error on any markup not permitted in Confluence link bodies

See SYNTAX for how to represent these in "Confluence markdown".

Installation

Install from source:

$ stack install

Installation from static binary coming soon! (TODO)

Contributing

Setting up development environment

If you don't already have Haskell installed, the best way to install it is via GHCup.

Testing

To run the end-to-end tests, you need to install the following dependencies:

$ npm i -g html-minifier

Run tests via make:

$ make test         # run end-to-end tests
$ make doctest      # test examples in doc comments
$ make test-all     # run all tests

Resources

Documentation

Similar projects