This page describes the process I use to build this website. Although this is a fairly basic website, it involves the following core components:

  • Confluence - an excellent documentation platform by Atlassian (probably a better description: an enterprise wiki that happens to integrate well with Atlassian's development tools)
  • confluence2pelican - a Python module for retrieving content from Confluence to be processed by Pelican
  • Pelican - a static site generator written in Python, but you could probably substitute Jekyll or Hugo

If you're coming here hoping to convert a Confluence space to a static website and you haven't used Pelican before, please first experiment and become familiar with Pelican!

The Process

My process for updating this website goes something like this (sub-points describe what happens in the background)

  1. Add/modify content within my Confluence space
  2. Run generate.sh -l to process the Confluence space and start a server on localhost
    1. generate.sh calls module confluence2pelican which retrieves everything from my Confluence space and places it in data/export
    2. generate.sh calls pelican which processes the data/export directory and generates content in data/output and then creates a simple web server
  3. Head on over to localhost:8080 and review the changes
  4. If satisfied with the output, publish it to an S3 bucket using publish.sh
    1. publish.sh calls rclone which syncs data/output to the S3 bucket where the online version of this website lives

Caveats

So, there are some caveats if you want to give confluence2pelican a go:

  • The repository contains most of everything you need to get started, simply clone it and install pydal and pelican via pip but it is for now missing the templates
  • The data directory will be littered with all sorts of junk: sqlite database with content from confluence, attachments directory, temporary settings files, etc..
  • Due to some Pelican limitations confluence2pelican does mutilate the html generated in the data/exports directory which results in broken links (if browsed directly)
  • Some Confluence macros will not result in working HTML in the export and possibly expose your Confluence URL (for example the Page Tree macro)