This repository contains the developer documentation shared across Couchbase Server and Couchbase Capella.
The developer documentation includes introductions, tutorials, developer guides, and reference guides for specific Couchbase services.
This repository is the implementation of the striping strategy that the Documentation team discussed at the 2023 Docs Summit.
The goal of this repository is to create a consistent experience for shared content across Server and Capella.
This repository contains branches for the different products and versions you would need to support with devex docs.
By using an included partial nav.adoc
file, you can seamlessly include documentation from this repository into the Server and Capella documentation.
The workflow for developing documentation in this repository should look similar to the following:
-
Choose your base product for developing the documentation. For example, you could decide to start writing your docs in a new feature branch based on the
release/7.2
branch for Server, or directly on that branch in a new folder undermodules
. -
Write your documentation files as normal.
-
Create a ToC in the
partials
folder for those documentation files:
* xref:my-new-module:intro.adoc[]
** xref:my-new-module:new-content.adoc[]
-
Copy your new documentation files into the
capella
branch, or a new Capella feature branch based on your Server feature branch. -
Make the necessary tweaks for the documentation to apply to Capella.
-
If you created feature branches for your work, merge them into the
release/7.2
orcapella
branches in this repository. -
Go to the
docs-server
andcouchbase-cloud
repositories, as described in Configure Your Local nav.adoc Files, and add your partials to those nav.adoc files.
Ta-da, you've created devex documentation!
To add the content from the docs-devex repository to your local Antora builds:
-
In a terminal, run
antora local-antora-playbook.yml
.
NOTE: If you run into unexpected behavior when attempting to build (like files not appearing as expected, other errors), add the
--fetch
flag to the end of theantora local-antora-playbook.yml
command.
You need to start by including this repository in your local-antora-playbook.yml
file:
-
In the
docs-site
repository, open yourlocal-antora-playbook.yml
file in a text editor. -
Under the
sources
key, add a newurl
entry for https://github.com/couchbaselabs/docs-devex. -
In the
branches
key for the newurl
, add the branches that you want to include in your build. For example,[capella,release/7.2]
for the Couchbase Capella and Couchbase Server 7.2 branches. -
Make sure that your
sources
key includesurl
keys for your local copies of thecouchbase-cloud
anddocs-server
repositories.
NOTE: If you want to create a build using a local copy of two different branches from the
docs-devex
repository, see Use Worktrees to Create a Fully Local Build.
Then, make sure that you include the nav partial files into the navigation for Server and Capella:
-
In your local copy of the
docs-server
repository, go to modules > ROOT. -
Open the
nav.adoc
file in a text editor. -
In the ToC structure, choose where you want to include the navigation for the devex branch.
-
Add an include for the
nav.adoc
partial from the devex branch:
include::<MODULE_NAME>:partial$nav.adoc[]
- Repeat Steps 2-4 for the
couchbase-cloud
repository'snav.adoc
file, located in docs > public > modules > ROOT.
If you're creating new branches in the docs-devex repository and want to create a fully local build, you'll need to use git worktrees:
-
Open your
docs-devex
repository in a terminal window. -
In the terminal, enter
git worktree add <LOCAL_FOLDER_NAME> <BRANCH_NAME>
. It's recommended to give your local folder the same name as the branch. -
Repeat Step 2 for all of the branches you need on your local machine.
-
In the
docs-site
repository, open yourlocal-antora-playbook.yml
file in a text editor. -
Change the
url
key for thedocs-devex
branch to point to your local copy of the repository. -
Set the
branches
key for thedocs-devex
branch to include the branches you added as worktrees. -
Under the
branches
key, add aworktrees
key set totrue
:
- url: ../docs-devex
branches: [my-server-branch, my-capella-branch]
worktrees: true
You should be able to build your documentation using the local copies of your branches.
When you want to make changes, edit the files in the specific worktree folder for your branch.
The Couchbase Developer Documentation © 2024 by Couchbase Inc. is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
See the LICENSE file or the Creative Commons CC BY-NC-SA 4.0 license page for details.