npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

confluence-to-markdown

v1.2.0

Published

Convert Confluence Pages to Markdown

Downloads

64

Readme

Confluence to Markdown converter which is actually working

Convert Confluence HTML export to Markdown

Requirements

You must have pandoc command line tool installed. Check it by running:

pandoc --version

Install all project dependencies:

npm install

Usage

In the converter's directory:

npm run start <pathResource> <pathResult>

Parameters

parameter | description --- | --- <pathResource> | File or directory to convert with extracted Confluence export <pathResult> | Directory to where the output will be generated to. Defaults to current working directory

Process description

  • Confluence page IDs in HTML file names and links are replaced with that pages' heading
  • overall index.md is created linking all Confluence spaces - their indexes
  • images and other inserted attachments are linked to generated markdown
    • whole images and attachments directories are copied to resulting directory
      • there is no checking done whether perticular file/image is used or not
  • markdown links to internal pages are generated without the trailing .md extension to comply to gitit expectations
    • this can be changed by finding all occurances of gitit requires link to pages without .md extension in the .coffee files and adding the extension there.
    • or you can send a PR ;)
  • the pandoc utility can accept quite a few options to alter its default behavior
    • those can be passed to it by adding them to @outputTypesAdd, @outputTypesRemove, @extraOptions properties in the App.coffee file
    • or you can send a PR ;)
    • here is the list of options pandoc can accept
  • throughout the application a single console logger is used, its default verbosity is set to INFO
    • you can change the verbosity to one of DEBUG, INFO, WARNING, ERROR levels in the Logger.coffee file
    • or you can send a PR ;)
  • a series of formatter rules is applied to the HTML text of Confluence page for it to be converted properly

Room for improvement

If you happen to find something not to your liking, you are welcome to send a PR. Some good starting points are mentioned in the Process description section above.

Export to HTML

Note that if the converter does not know how to handle a style, HTML to Markdown typically just leaves the HTML untouched (Markdown does allow for HTML tags).

Step by step guide for Confluence data export

  1. Go to the space and choose Space tools > Content Tools on the sidebar.
  2. Choose Export. This option will only be visible if you have the Export Space permission.
  3. Select HTML then choose Next.
  4. Decide whether you need to customize the export:
  • Select Normal Export to produce an HTML file containing all the pages that you have permission to view.
  • Select Custom Export if you want to export a subset of pages, or to exclude comments from the export.
  1. Extract zip

WARNING
Please note that Blog will NOT be exported to HTML. You have to copy it manually or export it to XML or PDF. But those format cannot be processed by this utility.

Attribution

Thanks to Eric White for a starting point.