From 2beed041326f09a6c4ff3d572dcdf635cc82f128 Mon Sep 17 00:00:00 2001 From: x_0o0 Date: Fri, 5 Apr 2024 01:34:21 +0900 Subject: [PATCH] [ADD] Distributing documentation via BitBucket Server --- BitBucket/README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 BitBucket/README.md diff --git a/BitBucket/README.md b/BitBucket/README.md new file mode 100644 index 0000000..5d9c129 --- /dev/null +++ b/BitBucket/README.md @@ -0,0 +1,43 @@ +# Distributing Documentation via BitBucket (BitBucket Server) + +## 1. Overview + +To share your documentation, you create a documentation archive, a self-contained bundle that has everything you need, including: +- Compiled documentation from in-source comments, articles, tutorials, and resources +- A single-page web app that renders the documentation + +Distributing your documentation involves the following steps: +1. Export your documentation using the docc command-line tool. +2. Share your documentation by hosting it on a website. + +## 2. Methodology + +### 2.1. Repository Settings + +> Reference: https://support.atlassian.com/bitbucket-cloud/docs/publishing-a-website-on-bitbucket-cloud/ + +> **Important**: Your repository should belong to some project. + +1. Go to **Repository settings** > **Web Pages** +2. Enable pages for branches (or tags) + +### 2.2. Generate Documentation +Run command below to configure the web hosting + a. Go to BitBucket repository settings > Web Pages and refer to URL examples for the file path + b. **pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs** + ```bash + swift package --allow-writing-to-directory ./docs \ + generate-documentation --target {SCHEME NAME} \ + --disable-indexing \ + --transform-for-static-hosting \ + --hosting-base-path pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs \ + --output-path ./docs + ``` + +### 2.3. Distributing Documentation +After pushing the commit, it's distributed automatically. +You can check the documentation from the URL: + +https://{COMPANY_HOST_URL}/pages/{PROJECT}/{REPOSITORY}/{BRANCH}/browse/docs **/documentation/{FIREST_DOCUMENTATION_NAME}** + +e.g., https://repo.jaesung.dev/pages/DDOC/code-style-guide/main/browse/docs/documentation/codestyleguide