Coder Social home page Coder Social logo

push2confluence's Introduction

push2confluence

What's this?

  • Takes a properly annotated Markdown file
  • Converts the contents into Confluence's storage format (XHTML)
  • Replaces the corresponding page in Confluence

Configuration

Create a file ~/.confluence with:

CONFLUENCE_SERVER = 'https://confluence.my.domain'
PERSONAL_ACCESS_TOKEN = 'my_personal_token' # Profile -> Settings -> Personal Access Tokens
DEFAULT_SPACE_KEY = '~username'

What does "properly annotated Markdown" mean?

  • The Markdown file must have a YAML front matter section.
  • The front matter must have a property confluence-page-id
  • The property must refer to an existing page ID in Confluence.
  • If the front matter has a property confluence-space-key, then it will be used instead of the default.
  • The page must exist in the selected Confluence space.

How to get a valid page ID

  • Find the relevant page on Confluence.
    • Create it first, if needed. This script doesn't do that for you!
  • Go the the Page Information (in the ... menu top-right)
  • Extract the pageID parameter from the URL

About the Markdown to XHTML conversion

  • Markdown is converted to XHTML with Redcarpet, including support for:
    • tables
    • footnotes
    • fenced code blocks
  • All wiki links are turned into normal text. These wouldn't work anyway.
  • No other things are done. So file inclusions, images and other "special" things won't work.
  • The final XHTML is prefixed with a hard-coded warning, stating that editing is of no use.

Notes

push2confluence's People

Contributors

voostindie avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.