- with npm
npm install @labset/confluence-website --save-dev
- with yarn
yarn add @labset/confluence-website -D
./node_modules/.bin/confluence-website init-env
it creates a .env
file with the following properties
CONFLUENCE_SITE_NAME
: the Confluence cloud instance you want to generate a site from (name.atlassian.net)CONFLUENCE_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 hostedGOOGLE_ANALYTICS_TRACKING_ID
: Google Analytics tracking id
./node_modules/.bin/confluence-website init-site
it creates a .confluence-website.json
file with the following configuration
{
"title": "confluence-website",
"iconUrl": "",
"name": "space name",
"theme": {
"name": "confluence-website",
"backgroundColor": "rgb(0, 102, 68)",
"highlightColor": "#FFFFFF"
}
}
./node_modules/.bin/confluence-website extract-space <spaceKey>
./node_modules/.bin/confluence-website build-space <spaceKey>