confluence-static-site

install it
npm install confluence-static-site -g
configure your site
confsite env
it creates a .env
file with the following properties
CONFLUENCE_SITE_NAME
: the Confluence cloud instance you want to generate a site fromCONFLUENCE_USERNAME
: the username to use to consume Confluence APIsCONFLUENCE_API_TOKEN
: the user personal access token to consume Confluence APIsTARGET_SITE
: the domain name of where your generated site will be hostedTWITTER_SITE
: the twitter handle for seo purposesGOOGLE_ANALYTICS_TRACKING_ID
: Google Analytics tracking id
confsite config
it creates a .confluence-static-site.json
file with the following configuration
{
"title": "confluence-static-site",
"iconUrl": "",
"name": "space name",
"theme": {
"name": "confluence-static-site",
"backgroundColor": "rgb(0, 102, 68)",
"highlightColor": "#FFFFFF"
}
}
confsite extract <spaceKey>
build your site
confsite build <spaceKey>
confsite build <spaceKey> --serve
confsite build <spaceKey> --assets my-assets-folder
everything in the output directory
Once your content is extracted and the site is built, you will have an output
directory created in
the root of your project folder with the following structure
- output
- site
- <spaceKey>
- articles
- <blog-title-1>
- <blog-title-2>
- ...
- assets
- avatars
- emojis
- attachments
- notes
- <page-title-1>
- <page-title-2>
- ...
- object-resolver
- templates
What you need to deploy is the output/site/<spaceKey>
deploy your site