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目的のTwitterハンドルGOOGLE_ANALYTICS_TRACKING_ID : Google アナリティクスのトラッキング 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>です。