Need help with mark?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

345 Stars 62 Forks Other 160 Commits 42 Opened issues


Sync your markdown files with Confluence pages.

Services available


Need anything else?

Contributors list


All Contributors <!-- ALL-CONTRIBUTORS-BADGE:END -->

Mark — a tool for syncing your markdown documentation with Atlassian Confluence pages.

Read the blog post discussing the tool —

This is very useful if you store documentation to your software in a Git repository and don't want to do an extra job of updating Confluence page using a tinymce wysiwyg enterprise core editor which always breaks everything.

Mark does the same but in a different way. Mark reads your markdown file, creates a Confluence page if it's not found by its name, uploads attachments, translates Markdown into HTML and updates the contents of the page via REST API. It's like you don't even need to create sections/pages in your Confluence anymore, just use them in your Markdown documentation.

Mark uses an extended file format, which, still being valid markdown, contains several HTML-ish metadata headers, which can be used to locate page inside Confluence instance and update it accordingly.

File in the extended format should follow the specification: ```markdown <!-- Space: --> <!-- Parent: --> <!-- Parent: --> <!-- Title: --> <!-- Attachment: <local path> --> <!-- Label: <label> --> <!-- Label: <label> --></label></label></local>


There can be any number of

headers, if Mark can't find specified parent by title, Mark creates it.

Also, optional following headers are supported:

  • (default) article: content will be put in narrow column for ease of reading;
  • plain: content will fill all page;

  • (default) page: normal Confluence page - defaults to this if omitted
  • blogpost: Blog post in
    . Cannot have

Setting the sidebar creates a column on the right side. You're able to add any valid HTML content. Adding this property sets the layout to


Mark supports Go templates, which can be included into article by using path to the template relative to current working dir, e.g.:

Templates can accept configuration data in YAML format which immediately follows the


Mark also supports attachments. The standard way involves declaring an

along with the other items in the header, then have any links with the same path:

An attached link is here

NOTE: Be careful with

! If your path string is a subset of another longer string or referenced in text, you may get undesired behavior.

Mark also supports macro definitions, which are defined as regexps which will be replaced with specified template:

Capture groups can be defined in the macro's which can be later referenced in the

syntax, where
number of a capture group in regexp (
is used for entire regexp match), for example:


Code Blocks

If you have long code blocks, you can make them collapsible with the Code Block Macro:

```bash collapse
some long bash code block

And you can also add a title:

```bash collapse title Some long long bash function
some long bash code block

You can collapse or have a title without language or any mix, but the language must stay in the front if it is given:

[] ["collapse"] ["title" ]

Template & Macros

By default, mark provides several built-in templates and macros:

  • template

    to include badge-like text, which accepts following parameters:
    • Title: text to display in the badge
    • Color: color to use as background/border for badge
    • Grey
    • Red
    • Yellow
    • Green
    • Blue
    • Subtle: specify to fill badge with background or not
    • true
    • false
  • template

    to include info, tip, note, and warning text boxes. Parameters:
    • Name: select box style
    • info
    • tip
    • note
    • warning
    • Icon: show information/tip/exclamation mark/warning icon
    • true
    • false
    • Title: title text of the box
    • Body: text to display in the box


  • template
    to include JIRA ticket link. Parameters:
    • Ticket: Jira ticket number like BUGS-123.


  • template:
    to include emoticons. Parameters:
    • Name: select emoticon
    • smile
    • sad
    • cheeky
    • laugh
    • wink
    • thumbs-up
    • thumbs-down
    • information
    • tick
    • cross
    • warning
    • plus
    • minus
    • question
    • light-on
    • light-off
    • yellow-star
    • red-star
    • green-star
    • blue-star


  • macro
    to mention user by name specified in the braces.

Template & Macros Usecases

Insert Disclaimer

**NOTE**: this document is generated, do not edit manually. ```markdown <!-- Space: TEST --> <!-- Title: My Article -->

This is my article. ```

Insert Status Badge

  • :done: Write Article
  • :todo: Publish Article

Insert Colored Text Box

:box:info::Foobar: :box:tip:Tip of day:Foobar: :box:note::Foobar: :box:warning:Alert!:Foobar:

Insert Table of Contents

If default TOC looks don't find a way to your heart, try parametrizing it, for example:

This is my nice title


You can call the

as you like but the
field must have the
value. Also, note the single quotes around

See Confluence TOC Macro for the list of parameters - keep in mind that here they start with capital letters. Every skipped field will have the default value, so feel free to include only the ones that you require.

Insert Jira Ticket

See task MYJIRA-123.


Go Get

go get -v


Download a release from the Releases page


$ docker run --rm -i kovetskiy/mark:latest mark 


mark [options] [-u ] [-p ] [-k] [-l ] -f 
mark [options] [-u ] [-p ] [-k] [-b ] -f 
mark [options] [-u ] [-p ] [--drop-h1] -f 
mark -v | --version
mark -h | --help
  • -u 
    — Use specified username for updating Confluence page.
  • -p 
    — Use specified password for updating Confluence page. Specify
    as password to read password from stdin.
  • -l 
    — Edit specified Confluence page. If -l is not specified, file should contain metadata (see above).
  • -b 
    – Base URL for Confluence. Alternative option for
    config field.
  • -f 
    — Use specified markdown file(s) for converting to html. Supports file globbing patterns (needs to be quoted).
  • -c 
    — Specify a path to the configuration file.
  • -k
    — Lock page editing to current user only to prevent accidental manual edits over Confluence Web UI.
  • --drop-h1
    – Don't include H1 headings in Confluence output.
  • --dry-run
    — Show resulting HTML and don't update Confluence page content.
  • --minor-edit
    — Don't send notifications while updating Confluence page.
  • --trace
    — Enable trace logs.
  • -v | --version
    — Show version.
  • -h | --help
    — Show help screen and call 911.

You can store user credentials in the configuration file, which should be located in ~/.config/mark (or specified via

-c --config 
) with the following format (TOML):
username = "your-email"
password = "password-or-api-key-for-confluence-cloud"
# If you are using Confluence Cloud add the /wiki suffix to base_url
base_url = "http://confluence.local"

NOTE: Labels aren't supported when using



Continuous Integration

It's quite trivial to integrate Mark into a CI/CD system, here is an example with Snake CI in case of self-hosted Bitbucket Server / Data Center.

  - sync

Sync documentation: stage: sync only: branches: - main image: kovetskiy/mark commands: - for file in $(find -type f -name '*.md'); do echo "> Sync $file"; mark -u $MARK_USER -p $MARK_PASS -b $MARK_URL -f $file || exit 1; echo; done

In this example, I'm using the

image for creating a job container where the repository with documentation will be cloned to. The following command finds all
files and runs mark against them one by one:
for file in $(find -type f -name '*.md'); do
    echo "> Sync $file";
    mark -u $MARK_USER -p $MARK_PASS -b $MARK_URL -f $file || exit 1;

The following directive tells the CI to run this particular job only if the changes are pushed into the

branch. It means you can safely push your changes into feature branches without being afraid that they automatically shown in Confluence, then go through the reviewal process and automatically deploy them when PR got merged.
    - main

File Globbing

Rather than running

multiple times, or looping through a list of files from
, you can use file globbing (i.e. wildcard patterns) to match files in subdirectories. For example:
mark -f "helpful_cmds/*.md"

Issues, Bugs & Contributions

I've started the project to solve my own problem and open sourced the solution so anyone who has a problem like me can solve it too. I have no profits/sponsors from this projects which means I don't really prioritize working on this project in my free time. I still check the issues and do code reviews for Pull Requests which means if you encounter a bug in the program, you should not expect me to fix it as soon as possible, but I'll be very glad to merge your own contributions into the project and release the new version.

I try to label all new issues so it's easy to find a bug or a feature request to fix/implement, if you are willing to help with the project, you can use the following labels to find issues, just make sure to reply in the issue to let everyone know you took the issue:

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Stanislav Seletskiy


Nick Klauer


Rolf Ahrenberg


Charles Southerland


Šarūnas Nejus


Alexey Baranov


Anthony Barbieri


Devin Auclair


Gezim Sejdiu


Josip Ćavar


Juho Saarinen


Luke Fritz


Matt Radford




Stefano Teodorani


Tim Schrumpf


Tyler Cole






Will Hegedus


Leandro Carneiro






Hugo Cisneiros


This project follows the all-contributors specification. Contributions of any kind welcome!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.