|
| 1 | +# Distributing Documentation via BitBucket (BitBucket Server) |
| 2 | + |
| 3 | +## 1. Overview |
| 4 | + |
| 5 | +To share your documentation, you create a documentation archive, a self-contained bundle that has everything you need, including: |
| 6 | +- Compiled documentation from in-source comments, articles, tutorials, and resources |
| 7 | +- A single-page web app that renders the documentation |
| 8 | + |
| 9 | +Distributing your documentation involves the following steps: |
| 10 | +1. Export your documentation using the docc command-line tool. |
| 11 | +2. Share your documentation by hosting it on a website. |
| 12 | + |
| 13 | +## 2. Methodology |
| 14 | + |
| 15 | +### 2.1. Repository Settings |
| 16 | + |
| 17 | +> Reference: https://support.atlassian.com/bitbucket-cloud/docs/publishing-a-website-on-bitbucket-cloud/ |
| 18 | +
|
| 19 | +> **Important**: Your repository should belong to some project. |
| 20 | +
|
| 21 | +1. Go to **Repository settings** > **Web Pages** |
| 22 | +2. Enable pages for branches (or tags) |
| 23 | + |
| 24 | +### 2.2. Generate Documentation |
| 25 | +Run command below to configure the web hosting |
| 26 | + a. Go to BitBucket repository settings > Web Pages and refer to URL examples for the file path |
| 27 | + b. **pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs** |
| 28 | + ```bash |
| 29 | + swift package --allow-writing-to-directory ./docs \ |
| 30 | + generate-documentation --target {SCHEME NAME} \ |
| 31 | + --disable-indexing \ |
| 32 | + --transform-for-static-hosting \ |
| 33 | + --hosting-base-path pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs \ |
| 34 | + --output-path ./docs |
| 35 | + ``` |
| 36 | + |
| 37 | +### 2.3. Distributing Documentation |
| 38 | +After pushing the commit, it's distributed automatically. |
| 39 | +You can check the documentation from the URL: |
| 40 | + |
| 41 | +https://{COMPANY_HOST_URL}/pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs **/documentation/{FIREST_DOCUMENTATION_NAME}** |
| 42 | + |
| 43 | +e.g., https://repo.jaesung.dev/pages/DDOC/code-style-guide/main/browse/docs/documentation/codestyleguide |
0 commit comments