confluence static site
2.3.0
npm install @labset/confluence-static-site --save-devyarn add @labset/confluence-static-site -D./node_modules/.bin/confsite env
./node_modules/.bin/confsite init-site < name > 다음 속성을 가진 .env 파일을 생성합니다.
CONFLUENCE_SITE_NAME : 사이트를 생성하려는 Confluence 클라우드 인스턴스CONFLUENCE_USERNAME : Confluence API를 사용하는 데 사용할 사용자 이름CONFLUENCE_API_TOKEN : Confluence API를 사용하기 위한 사용자 개인 액세스 토큰TARGET_SITE : 생성된 사이트가 호스팅될 도메인 이름TWITTER_SITE : SEO 목적을 위한 트위터 핸들GOOGLE_ANALYTICS_TRACKING_ID : Google Analytics 추적 ID ./node_modules/.bin/confsite config 다음 구성으로 .confluence-static-site.json 파일을 생성합니다.
{
"title" : " confluence-static-site " ,
"iconUrl" : " " ,
"name" : " space name " ,
"theme" : {
"name" : " confluence-static-site " ,
"backgroundColor" : " rgb(0, 102, 68) " ,
"highlightColor" : " #FFFFFF "
}
}./node_modules/.bin/confsite extract < spaceKey >
./node_modules/.bin/confsite extract-emojis < spaceKey >./node_modules/.bin/confsite build < spaceKey >
./node_modules/.bin/confsite build < spaceKey > --serve # with webpack dev server
./node_modules/.bin/confsite build < spaceKey > --assets my-assets-folder # copy your assets to the site output assets (i.e. site logo ...) 콘텐츠가 추출되고 사이트가 구축되면 프로젝트 폴더의 루트에 다음 구조의 output 디렉터리가 생성됩니다.
- output
- site
- <spaceKey>
- articles
- <blog-title-1>
- <blog-title-2>
- ...
- assets
- avatars
- emojis
- attachments
- notes
- <page-title-1>
- <page-title-2>
- ...
- object-resolver
- templates
배포해야 할 것은 output/site/<spaceKey> 입니다.