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)
- Add/modify content within my Confluence space
- Run
generate.sh -l
to process the Confluence space and start a server on localhostgenerate.sh
calls module confluence2pelican which retrieves everything from my Confluence space and places it indata/export
generate.sh
callspelican
which processes thedata/export
directory and generates content indata/output
and then creates a simple web server
- Head on over to localhost:8080 and review the changes
- If satisfied with the output, publish it to an S3 bucket using
publish.sh
publish.sh
callsrclone
which syncsdata/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
andpelican
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 thedata/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)