├── test ├── fixtures │ └── antora-output │ │ ├── extensions-embargoed.html │ │ ├── extensions-embargoed-ok.html │ │ ├── extensions-flagged.html │ │ └── extensions.html └── test-build.js ├── .npmrc ├── scripts ├── hwc ├── add-credentials ├── docstats ├── package.json ├── make-global-sitemap.sh ├── purge-previews.sh ├── make-site-digest.sh ├── escrow ├── patch-preview-playbook ├── preview-toc.js ├── preview-debug.scpt ├── preview-toc.hbs ├── patch-cutdown-playbook ├── populate-icon-defs.js └── generate ├── lib ├── helpers │ ├── ne.js │ ├── or.js │ ├── eq.js │ ├── range.js │ └── each-openapi.js ├── exclude-private-content-sources-extension.js ├── markdown-block.js ├── multirow-table-head-tree-processor.js ├── embargo.js ├── report-tree-tree.hbs ├── antora-component-version-rank.js ├── component-stats.js ├── inline-man-macro.js ├── json-config-ui-block-macro.js ├── inline-jira-macro.js ├── site-stats-extension.js ├── report-tree.hbs ├── swagger-ui-block-macro.js └── source-url-include-processor.js ├── home ├── modules │ ├── contribute │ │ ├── partials │ │ │ ├── templates │ │ │ │ ├── partial.hbs │ │ │ │ └── test.hbs │ │ │ └── component-terms.adoc │ │ ├── examples │ │ │ ├── test.yaml │ │ │ ├── developer-preview.adoc │ │ │ ├── helpers │ │ │ │ └── foo.js │ │ │ ├── links.adoc │ │ │ ├── inline-styles.adoc │ │ │ ├── ui-macros.adoc │ │ │ ├── lists.adoc │ │ │ ├── description-lists.adoc │ │ │ ├── kv-metrics.json │ │ │ ├── admonitions.adoc │ │ │ ├── code-blocks.adoc │ │ │ ├── tables.adoc │ │ │ └── local-staging-antora-playbook.yml │ │ ├── assets │ │ │ └── images │ │ │ │ ├── preview.png │ │ │ │ ├── search.png │ │ │ │ ├── explorer.png │ │ │ │ ├── unstaged.png │ │ │ │ ├── more-actions.png │ │ │ │ ├── console-login.png │ │ │ │ ├── source-control.png │ │ │ │ ├── unsafe-repo-1.png │ │ │ │ ├── unsafe-repo-2.png │ │ │ │ ├── add-description.png │ │ │ │ ├── discard-changes.png │ │ │ │ ├── edit-page-in-atom.png │ │ │ │ ├── find-and-replace.png │ │ │ │ ├── bulleted-list-items.png │ │ │ │ ├── github-branches-list.png │ │ │ │ ├── git-diff.svg │ │ │ │ ├── arrow-small-up.svg │ │ │ │ ├── arrow-small-down.svg │ │ │ │ └── edit.svg │ │ ├── pages │ │ │ ├── extensions-embargoed-ok.adoc │ │ │ ├── extensions-embargoed.adoc │ │ │ ├── extensions-flagged.adoc │ │ │ ├── workflow-overview.adoc │ │ │ ├── asciidoc-overview.adoc │ │ │ ├── install-antora.adoc │ │ │ ├── extensions.adoc │ │ │ ├── index.adoc │ │ │ ├── add-pages.adoc │ │ │ ├── extensions-template.adoc │ │ │ ├── nav-menus-and-files.adoc │ │ │ ├── install-git-and-editor.adoc │ │ │ ├── edit-pages.adoc │ │ │ ├── set-up-repository.adoc │ │ │ ├── component-configuration.adoc │ │ │ ├── ids.adoc │ │ │ ├── test-site.adoc │ │ │ └── tabs.adoc │ │ └── nav.adoc │ └── ROOT │ │ ├── assets │ │ └── images │ │ │ ├── github-blacktocat.png │ │ │ ├── mobile-features-top.png │ │ │ ├── couchbase-in-the-cloud.jpg │ │ │ ├── n1ql-ansi-join-example.png │ │ │ ├── bigdata-elasticsearch-comp.png │ │ │ ├── book-reader-icon.svg │ │ │ ├── database-icon.svg │ │ │ └── white-logos │ │ │ ├── sky.svg │ │ │ ├── ebay.svg │ │ │ ├── bd.svg │ │ │ ├── tommy-hilfiger.svg │ │ │ ├── pge.svg │ │ │ ├── verizon.svg │ │ │ ├── linkedin.svg │ │ │ ├── directv.svg │ │ │ ├── paypal.svg │ │ │ ├── amadeus.svg │ │ │ ├── cisco.svg │ │ │ ├── comcast.svg │ │ │ ├── tesco.svg │ │ │ └── wells-fargo.svg │ │ ├── partials │ │ ├── developer-preview.adoc │ │ └── info-banner.adoc │ │ └── pages │ │ ├── integrations.adoc │ │ ├── mobile.adoc │ │ ├── cloud.adoc │ │ └── columnar-sdk.adoc └── antora.yml ├── docsearch ├── hbs-helpers │ ├── eq.js │ ├── gt.js │ ├── rank.js │ ├── versioned.js │ └── versionless.js ├── Dockerfile.jenkins ├── Jenkinsfile └── docsearch-config.json.hbs ├── antora-playbook.preview.local.yml-example ├── .gitignore ├── .github └── workflows │ ├── npm-test.yml │ └── review-requested.yml ├── kroki ├── README.adoc └── docker-compose.yml ├── etc └── s3 │ ├── bucket-website.json │ └── bucket-policy.json ├── antora-playbook-chatbot.diff.yml ├── antora-playbook.preview2.diff.yml ├── package.json ├── gulpfile.js ├── antora-playbook-test.yml ├── antora-playbook.preview.diff.yml ├── antora-playbook-staging.diff.yml ├── slim-playbook.yml ├── antora-playbook-staging-chatbot.diff.yml ├── test-styleguide.yml ├── test-remote.yml └── README.adoc /test/fixtures/antora-output/extensions-embargoed.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | fund=false 2 | lockfile-version=3 3 | omit=optional 4 | -------------------------------------------------------------------------------- /scripts/hwc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cat $1 | htmlq -t article | wc -w 4 | -------------------------------------------------------------------------------- /lib/helpers/ne.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = (a, b) => a !== b 4 | -------------------------------------------------------------------------------- /lib/helpers/or.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = (a, b) => a || b 4 | -------------------------------------------------------------------------------- /lib/helpers/eq.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = (a, b) => a === b 4 | 5 | -------------------------------------------------------------------------------- /home/modules/contribute/partials/templates/partial.hbs: -------------------------------------------------------------------------------- 1 | This is some text from a partial 2 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/test.yaml: -------------------------------------------------------------------------------- 1 | foo: 2 | bar: 3 | baz: "A successful test" 4 | -------------------------------------------------------------------------------- /lib/helpers/range.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = (a, b, c) => (a >= b) && (a <= c) 4 | 5 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/developer-preview.adoc: -------------------------------------------------------------------------------- 1 | include:home:ROOT:partial$developer-preview.adoc[] -------------------------------------------------------------------------------- /docsearch/hbs-helpers/eq.js: -------------------------------------------------------------------------------- 1 | const eq = (a, b) => a === b 2 | 3 | module.exports.register = (hbs) => hbs.registerHelper('eq', eq) 4 | -------------------------------------------------------------------------------- /docsearch/hbs-helpers/gt.js: -------------------------------------------------------------------------------- 1 | const gt = (a, b) => a > b 2 | 3 | module.exports.register = (hbs) => hbs.registerHelper('gt', gt) 4 | -------------------------------------------------------------------------------- /home/modules/contribute/partials/templates/test.hbs: -------------------------------------------------------------------------------- 1 | This is a included Handlebars template! 2 | 3 | Type: {{kv_bg_batch_size.type}} 4 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/helpers/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = function (items, options) { 2 | return 'Hello from the foo helper!' 3 | } 4 | -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/preview.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/search.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/explorer.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/unstaged.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/unstaged.png -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/github-blacktocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/ROOT/assets/images/github-blacktocat.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/more-actions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/more-actions.png -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/mobile-features-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/ROOT/assets/images/mobile-features-top.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/console-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/console-login.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/source-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/source-control.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/unsafe-repo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/unsafe-repo-1.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/unsafe-repo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/unsafe-repo-2.png -------------------------------------------------------------------------------- /home/modules/contribute/examples/links.adoc: -------------------------------------------------------------------------------- 1 | https://www.couchbase.com/[The Couchbase Website^] 2 | 3 | https://github.com/[] 4 | 5 | mailto:someone@something.com[] -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/couchbase-in-the-cloud.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/ROOT/assets/images/couchbase-in-the-cloud.jpg -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/n1ql-ansi-join-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/ROOT/assets/images/n1ql-ansi-join-example.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/add-description.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/add-description.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/discard-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/discard-changes.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/edit-page-in-atom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/edit-page-in-atom.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/find-and-replace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/find-and-replace.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/bulleted-list-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/bulleted-list-items.png -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/bigdata-elasticsearch-comp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/ROOT/assets/images/bigdata-elasticsearch-comp.png -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/github-branches-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbase/docs-site/HEAD/home/modules/contribute/assets/images/github-branches-list.png -------------------------------------------------------------------------------- /home/antora.yml: -------------------------------------------------------------------------------- 1 | name: home 2 | title: Couchbase Documentation 3 | version: master 4 | nav: 5 | - modules/contribute/nav.adoc 6 | asciidoc: 7 | attributes: 8 | out-of-date: This documentation is out of date 9 | page-rank: 0@ 10 | -------------------------------------------------------------------------------- /home/modules/ROOT/partials/developer-preview.adoc: -------------------------------------------------------------------------------- 1 | [CAUTION] 2 | -- 3 | This is a Developer Preview feature, intended for development purposes only. 4 | Do not use this feature in production. 5 | No Enterprise Support is provided for Developer Preview features. 6 | -- -------------------------------------------------------------------------------- /home/modules/contribute/examples/inline-styles.adoc: -------------------------------------------------------------------------------- 1 | A bold *word*, a *bold phrase*, and bold c**hara**cter**s**. 2 | 3 | A monospace `word`, a `monospace phrase`, and monospace c``hara``cter``s``. 4 | 5 | `*monospace bold phrase*` and ``**char**``acter``**s**`` 6 | -------------------------------------------------------------------------------- /antora-playbook.preview.local.yml-example: -------------------------------------------------------------------------------- 1 | site: 2 | title: Couchbase Docs Local Preview 3 | 4 | output: 5 | dir: ./preview 6 | clean: true 7 | asciidoc: 8 | attributes: 9 | kroki-server-url: null 10 | content: 11 | sources: 12 | - url: https://github.com/couchbaselabs/docs-kubernetes-operator 13 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/ui-macros.adoc: -------------------------------------------------------------------------------- 1 | Click the btn:[Submit] button. 2 | 3 | Press kbd:[esc] to exit insert mode. 4 | 5 | You can cancel a running query by using the kbd:[Ctrl+C] keys. 6 | 7 | In the tool bar, select menu:File[Save]. 8 | 9 | Select menu:View[Zoom > Reset] to reset the zoom level. 10 | -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/git-diff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/extensions-embargoed-ok.adoc: -------------------------------------------------------------------------------- 1 | ifdef::flag-test-embargo[] 2 | :page-embargo: EMBARGOED 3 | endif::flag-test-embargo[] 4 | 5 | = This page should NOT be embargoed! 6 | 7 | This page should be output, because the embargo attribute is controlled by an `ifdef::flag-test-embargo[]` 8 | See `lib/embargo.js` and AV-50499 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.cache/ 2 | /docsearch/node_modules/ 3 | /netlify/node_modules/ 4 | /node_modules/ 5 | /public/ 6 | /preview/ 7 | /scripts/node_modules/ 8 | scripts/.npmrc 9 | local-antora-playbook.yml 10 | xref-validator.log 11 | .asciidoctorconfig 12 | **/.DS_Store 13 | .idea 14 | lab.sh 15 | record.json 16 | antora-playbook.preview.local.yml 17 | **/*.actual 18 | test/build/ 19 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/extensions-embargoed.adoc: -------------------------------------------------------------------------------- 1 | ifndef::flag-test-embargo[] 2 | :page-embargo: EMBARGOED 3 | endif::flag-test-embargo[] 4 | 5 | = This page is embargoed! 6 | 7 | This page should not be output. 8 | (Because the embargo attribute is controlled by an `ifndef::flag-test-embargo[]` and the attribute is not supplied). 9 | See `lib/embargo.js` and AV-50499 10 | -------------------------------------------------------------------------------- /.github/workflows/npm-test.yml: -------------------------------------------------------------------------------- 1 | name: Run docs-site npm tests 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | npm-test: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: checkout repo 11 | uses: actions/checkout@v4 12 | 13 | - uses: actions/setup-node@v4 14 | with: 15 | node-version: 22 16 | 17 | - name: npm test 18 | run: | 19 | npm ci 20 | npm test 21 | -------------------------------------------------------------------------------- /scripts/add-credentials: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CRED=~/.git-credentials 4 | 5 | if [ -f $CRED ]; then 6 | BACKUP=$CRED.backup 7 | mv $CRED $BACKUP 8 | echo "Backed up credentials to $BACKUP" 9 | fi 10 | 11 | set -euo pipefail 12 | USER=$(gh api user -q .login) 13 | TOKEN=$(gh auth token) 14 | VALUE="https://${USER}:${TOKEN}@github.com" 15 | 16 | echo "Updating $CRED:" 17 | echo " $VALUE" 18 | echo "https://${USER}:${TOKEN}@github.com" > $CRED 19 | -------------------------------------------------------------------------------- /home/modules/ROOT/partials/info-banner.adoc: -------------------------------------------------------------------------------- 1 | // This banner partial can be edited to link 2 | // to marketing or new Docs content as appropriate. 3 | // 4 | // This is linked from each of the Landing pages. 5 | // To *disable* it, simply comment out the text BELOW. 6 | 7 | // NOTE: comment the paragraph below to hide the banner. 8 | 9 | // [.info-banner] 10 | // Some exciting stuff is happening! 11 | // https://www.couchbase.com/example/link[Check it out] 12 | -------------------------------------------------------------------------------- /docsearch/hbs-helpers/rank.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const rank = (versions, version, latest) => { 4 | //if (version.version === latest) return 1 5 | //const latestVersionIdx = versions.findIndex((candidate) => candidate.version === latest) 6 | //const idx = versions.indexOf(version) 7 | //return idx + (idx < latestVersionIdx ? 2 : 1) 8 | return versions.indexOf(version) + 1 9 | } 10 | 11 | module.exports.register = (hbs) => hbs.registerHelper('rank', rank) 12 | -------------------------------------------------------------------------------- /lib/helpers/each-openapi.js: -------------------------------------------------------------------------------- 1 | // Format config section of openapi property definitions. 2 | // We pass in a data structure from an openapi Schema. 3 | // 4 | // Table of Contents (of the tree of this Schema, in HTML, linked to below) 5 | // 6 | // The Asciidoc template is called for each node of the tree 7 | // 8 | // see extensions-template.adoc for motivating example. 9 | 10 | const lib = require('./lib/each-openapi-module.js') 11 | module.exports = lib.main 12 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/lists.adoc: -------------------------------------------------------------------------------- 1 | // tag::check[] 2 | * [*] checked 3 | * [x] also checked 4 | * [ ] not checked 5 | // end::check[] 6 | 7 | // tag::ordered[] 8 | . Step 1, Level 1 9 | .. Step 1, Level 2 10 | ... Step 1, Level 3 11 | .... Step 1, Level 4 12 | ..... Step 1, Level 5 13 | . Step 2 14 | // end::ordered[] 15 | 16 | // tag::unordered[] 17 | * Level 1 18 | ** Level 2 19 | *** Level 3 20 | **** Level 4 21 | ***** Level 5 22 | * Level 1 23 | // end::unordered[] 24 | -------------------------------------------------------------------------------- /lib/exclude-private-content-sources-extension.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports.register = function () { 4 | if (this.getVariables().playbook.env.GIT_CREDENTIALS) return 5 | this.once('playbookBuilt', function ({ playbook }) { 6 | const env = playbook.env 7 | playbook = JSON.parse(JSON.stringify(playbook)) 8 | playbook.content.sources = playbook.content.sources.filter(({ url }) => !url.startsWith('https://git@')) 9 | playbook.env = env 10 | this.updateVariables({ playbook }) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /scripts/docstats: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Word counts of all
content:" 4 | echo ============= 5 | echo 6 | 7 | for dir in public/*/*/ 8 | do 9 | WC=$( 10 | find $dir \ 11 | -name '*.html' \ 12 | -exec scripts/hwc {} ';' \ 13 | | perl -ne '$SUM += $_; END { print "$SUM\n" }' ) 14 | 15 | if [[ -n "$WC" && "$WC" -gt 0 ]]; then 16 | echo $dir 17 | echo $WC 18 | 19 | PAGES=$( find $dir -name '*.html' | wc -l ) 20 | echo $PAGES 21 | fi 22 | done 23 | 24 | echo 25 | 26 | -------------------------------------------------------------------------------- /lib/markdown-block.js: -------------------------------------------------------------------------------- 1 | const md = require('markdown-it')() 2 | 3 | module.exports = function (registry) { 4 | registry.block(function () { 5 | var self = this 6 | self.named('markdown') 7 | self.onContext(['open', 'listing']) 8 | self.process(function (parent, reader) { 9 | 10 | var lines = reader.getLines() 11 | const source = lines.join('\n') 12 | const html = md.render(source) 13 | 14 | return self.createOpenBlock(parent, `\n\n++++\n${html}\n++++\n\n`) 15 | }) 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /docsearch/hbs-helpers/versioned.js: -------------------------------------------------------------------------------- 1 | // A component with an empty version (defined as `~` in the playbook.yml) 2 | // or named 'master' is considered to be "versionless", so the URL generated 3 | // will be simply e.g. https://docs.couchbase.com/cloud/ 4 | // whereas a "versioned" component might have /current/ or /7.1/ appended. 5 | 6 | const versioned = (components) => components.filter( 7 | ({ latest }) => 8 | latest != 'master' 9 | && latest != '') 10 | 11 | module.exports.register = (hbs) => hbs.registerHelper('versioned', versioned) 12 | -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/arrow-small-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | image/svg+xml 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/arrow-small-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | image/svg+xml 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/review-requested.yml: -------------------------------------------------------------------------------- 1 | name: Review Requested 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - home/ 7 | 8 | jobs: 9 | vale: 10 | if: github.event.requested_reviewer.login == 'tech-comm-team-couchbase' 11 | uses: couchbaselabs/docs-runner/.github/workflows/vale-review.yml@main 12 | with: 13 | path: home/ 14 | pull_request_number: ${{ github.event.number }} 15 | base_sha: ${{ github.event.pull_request.base.sha }} 16 | head_sha: ${{ github.event.pull_request.head.sha }} 17 | repository: ${{ github.repository }} 18 | secrets: inherit 19 | -------------------------------------------------------------------------------- /scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scripts", 3 | "private": true, 4 | "dependencies": { 5 | "@fortawesome/fontawesome-free": "~5.15", 6 | "@fortawesome/fontawesome-svg-core": "~1.2", 7 | "@fortawesome/free-brands-svg-icons": "~5.15", 8 | "@fortawesome/free-solid-svg-icons": "~5.15", 9 | "@fortawesome/free-regular-svg-icons": "~5.15", 10 | "vinyl-fs": "~3.0", 11 | "js-yaml": "~4.1" 12 | }, 13 | "optionalDependencies": { 14 | "@fortawesome/pro-solid-svg-icons": "~5.15", 15 | "@fortawesome/pro-regular-svg-icons": "~5.15", 16 | "@fortawesome/pro-light-svg-icons": "~5.15" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/fixtures/antora-output/extensions-embargoed-ok.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

This page should NOT be embargoed!

4 | 5 |
6 |
    7 |
    8 | 9 | 10 |
    11 |
    12 | 13 | 14 | + 15 |
    16 |

    This page should be output, because the embargo attribute is controlled by an ifdef::flag-test-embargo[] 17 | See lib/embargo.js and AV-50499

    18 |
    19 | -------------------------------------------------------------------------------- /scripts/make-global-sitemap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MANIFEST=${1-public/site-manifest.json} 4 | SITEMAP=${2-public/global-sitemap.xml} 5 | 6 | ( 7 | cat <
    9 | 10 | HEADER 11 | 12 | jq -r \ 13 | '(.generated / 1000 | todate) as $date | 14 | .url as $url | 15 | 16 | .components | 17 | map(.versions[0]) | 18 | map(.pages) | 19 | flatten | 20 | map("" + 21 | "" + $url + .url + "" + 22 | "" + $date + "" + 23 | "") | join("\n")' \ 24 | $MANIFEST 25 | 26 | echo '' 27 | ) > $SITEMAP 28 | -------------------------------------------------------------------------------- /lib/multirow-table-head-tree-processor.js: -------------------------------------------------------------------------------- 1 | function multirowTableHeadTreeProcessor () { 2 | this.process((doc) => { 3 | for (const table of doc.findBy({ context: 'table' })) { 4 | const hrows = table.getAttribute('hrows') 5 | if (hrows) { 6 | const rows = table.rows 7 | const moveRows = Math.min(+hrows - rows.head.length, rows.body.length) 8 | if (moveRows) rows.head.push(...rows.body.splice(0, moveRows)) 9 | } 10 | } 11 | }) 12 | } 13 | 14 | function register (registry, { file }) { 15 | if (file.contents.includes('hrows=')) { 16 | registry.treeProcessor(multirowTableHeadTreeProcessor) 17 | } 18 | } 19 | 20 | module.exports.register = register 21 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/book-reader-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kroki/README.adoc: -------------------------------------------------------------------------------- 1 | = Kroki Support 2 | 3 | The Couchbase site supports diagrams defined as text, which will allow us to create diagrams that can be created without the need for any artistic talent, and can also be version controlled. 4 | 5 | We use a service called https://kroki.io[Kroki^] to convert the text definitions (which can be embedded directly in an Asciidoc document), which runs on our own server at: http://3.91.133.254:9500/. 6 | 7 | NOTE: You have to be logged on to `vpn-public.couchbase.com` to see it. 8 | 9 | The service runs under Docker, and was created using the compose script you'll find here. 10 | 11 | If you want to run your own version of Kroki locally, then just setup your own Docker instance using the same file. -------------------------------------------------------------------------------- /scripts/purge-previews.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | INPUT=builds.json 4 | 5 | PURGE_DAYS=${PURGE_DAYS-30} 6 | 7 | # `date` is different on Mac/Linux so we have to do some fiddling 8 | UNAME="$(uname -s)" 9 | case "${UNAME}" in 10 | Linux*) machine=Linux;; 11 | Darwin*) machine=Mac;; 12 | CYGWIN*) machine=Cygwin;; 13 | MINGW*) machine=MinGw;; 14 | MSYS_NT*) machine=MSys;; 15 | *) machine="UNKNOWN:${unameOut}" 16 | esac 17 | 18 | if [ $machine == "Mac" ]; 19 | then 20 | SINCE=`date -v -${PURGE_DAYS}d -I` 21 | else 22 | SINCE=`date -d "${PURGE_DAYS} days ago" -I` 23 | fi 24 | 25 | 26 | jq --arg SINCE "$SINCE" \ 27 | -r \ 28 | 'to_entries[] | select(.value.date < $SINCE) | .key' \ 29 | $INPUT 30 | -------------------------------------------------------------------------------- /scripts/make-site-digest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MANIFEST=${1-public/site-manifest.json} 4 | DIGEST=${2-public/site-digest.txt} 5 | 6 | # TODO rewrite this in Javascript? 7 | # update the MD5 into the digest file, instead of a .txt file. 8 | # then any output can be handled with a template iteration. 9 | # (This may be more similar to what OpenDevise end up doing in any case.) 10 | 11 | for URL in $( 12 | jq -r \ 13 | '.components | .. | select(.url?) | select(.alias? | not) | .url' \ 14 | $MANIFEST \ 15 | | grep -v '^null$' \ 16 | | sort -u) 17 | do 18 | FILE=public$URL 19 | # fillet out just the
    section of the HTML file 20 | <$FILE htmlq main article > $FILE.digest 21 | md5sum $FILE.digest 22 | done > $DIGEST 23 | -------------------------------------------------------------------------------- /home/modules/contribute/assets/images/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /kroki/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | kroki: 4 | image: yuzutech/kroki 5 | depends_on: 6 | - blockdiag 7 | - mermaid 8 | - bpmn 9 | - excalidraw 10 | environment: 11 | - KROKI_BLOCKDIAG_HOST=blockdiag 12 | - KROKI_MERMAID_HOST=mermaid 13 | - KROKI_BPMN_HOST=bpmn 14 | - KROKI_EXCALIDRAW_HOST=excalidraw 15 | ports: 16 | - "9500:8000" 17 | blockdiag: 18 | image: yuzutech/kroki-blockdiag 19 | expose: 20 | - "8001" 21 | mermaid: 22 | image: yuzutech/kroki-mermaid 23 | expose: 24 | - "8002" 25 | bpmn: 26 | image: yuzutech/kroki-bpmn 27 | expose: 28 | - "8003" 29 | excalidraw: 30 | image: yuzutech/kroki-excalidraw 31 | expose: 32 | - "8004" 33 | -------------------------------------------------------------------------------- /docsearch/hbs-helpers/versionless.js: -------------------------------------------------------------------------------- 1 | // A component with an empty version (defined as `~` in the playbook.yml) 2 | // or named 'master' is considered to be "versionless", so the URL generated 3 | // will be simply e.g. https://docs.couchbase.com/cloud/ 4 | // whereas a "versioned" component might have /current/ or /7.1/ appended. 5 | // 6 | // Note that 'home' and 'tutorials' are special-cased elsewhere in the template, 7 | // and therefore excluded from this filter. 8 | 9 | const versionless = (components) => components.filter( 10 | ({ name, latest }) => 11 | name !== 'home' 12 | && name !== 'tutorials' 13 | && ( 14 | latest === 'master' 15 | || latest === '')) 16 | 17 | module.exports.register = (hbs) => hbs.registerHelper('versionless', versionless) 18 | -------------------------------------------------------------------------------- /etc/s3/bucket-website.json: -------------------------------------------------------------------------------- 1 | { 2 | "IndexDocument": { 3 | "Suffix": "index.html" 4 | }, 5 | "RoutingRules": [ 6 | { 7 | "Condition": { 8 | "HttpErrorCodeReturnedEquals": "404", 9 | "KeyPrefixEquals": "developer" 10 | }, 11 | "Redirect": { 12 | "HostName": "docs.couchbase.com", 13 | "ReplaceKeyWith": "home/index.html" 14 | } 15 | }, 16 | { 17 | "Condition": { 18 | "HttpErrorCodeReturnedEquals": "404", 19 | "KeyPrefixEquals": "admin" 20 | }, 21 | "Redirect": { 22 | "HostName": "docs.couchbase.com", 23 | "ReplaceKeyWith": "home/index.html" 24 | } 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/description-lists.adoc: -------------------------------------------------------------------------------- 1 | Bucket:: The top-level data storage container for data in a Capella database. 2 | A database can have multiple buckets, but must contain at least 1 bucket before it can store any data. 3 | + 4 | For more information about buckets, see Buckets, Scopes, and Collections. 5 | These sentences appear as a new line for the definition of *Bucket*. 6 | 7 | Scope:: A data storage container inside a Capella database. 8 | Add scopes to a bucket to organize and group related collections in a Capella database. 9 | + 10 | NOTE: A bucket can only contain a maximum of 1000 scopes. 11 | This admonition is part of the definition for *Scope*. 12 | 13 | Collection:: 14 | * Collections exist inside scopes. 15 | .. Create a new collection to store your documents. 16 | .. This is the final list item. 17 | 18 | -------------------------------------------------------------------------------- /docsearch/Dockerfile.jenkins: -------------------------------------------------------------------------------- 1 | # Extends the official Algolia docsearch-scraper image so it can be used with 2 | # Jenkins. It's used by the docsearch-scraper CI job, which is configured in the 3 | # adjacent Jenkinsfile. 4 | FROM algolia/docsearch-scraper:v1.12.0 5 | 6 | ARG GROUP_ID=1000 7 | ARG USER_ID=1000 8 | RUN groupadd -g $GROUP_ID jenkins && \ 9 | useradd -u $USER_ID -g $GROUP_ID -d /docsearch -M jenkins && \ 10 | curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && \ 11 | apt-get install -y nodejs && \ 12 | mkdir /docsearch && \ 13 | cp /root/Pipfile* /docsearch/ && \ 14 | cp -r /root/src /docsearch/ && \ 15 | find /docsearch -exec chown jenkins:jenkins {} \; && \ 16 | find /docsearch -type d -exec chmod 755 {} \; && \ 17 | find /docsearch -type f -exec chmod 644 {} \; 18 | 19 | ENTRYPOINT [ "" ] 20 | -------------------------------------------------------------------------------- /lib/embargo.js: -------------------------------------------------------------------------------- 1 | module.exports.register = function ({ config }) { 2 | const logger = this.getLogger('embargo-extension') 3 | this 4 | .on('navigationBuilt', ({ contentCatalog }) => { 5 | contentCatalog.getComponents().forEach(({ versions }) => { 6 | versions.forEach(({ name: component, version, navigation: nav, url: defaultUrl }) => { 7 | contentCatalog 8 | .findBy({ component, version, family: 'page' }) 9 | .filter((page) => page.out) 10 | .forEach((page) => { 11 | if (page.asciidoc.attributes['page-embargo'] != null) { 12 | console.log("Embargoed", page.pub.url, page.asciidoc.attributes['page-embargo']) 13 | contentCatalog.removeFile(page) 14 | } 15 | }) 16 | }) 17 | }) 18 | }) 19 | } 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/database-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /scripts/escrow: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ESCROW_VERSION=$1 4 | 5 | if [ -z "$ESCROW_VERSION" ]; then 6 | echo Usage: 7 | echo scripts/escrow {version} 8 | echo 9 | echo e.g. 10 | echo scripts/escrow 7.6.5 11 | echo 12 | echo will build antora-playbook.escrow.7.6.5.yml 13 | exit 1 14 | fi 15 | 16 | cd $(dirname $0) 17 | cd .. 18 | 19 | set -eo pipefail 20 | echo "🐦‍⬛ Building Escrow docs for $ESCROW_VERSION" 21 | 22 | PLAYBOOK=antora-playbook.escrow.$ESCROW_VERSION.yml 23 | DIR=./escrow-$ESCROW_VERSION 24 | 25 | npm ci 26 | npx antora $PLAYBOOK --to-dir $DIR --stacktrace --fetch 27 | cp $PLAYBOOK $DIR 28 | 29 | TARFILE=./escrow-$ESCROW_VERSION.tgz 30 | 31 | tar cvzf $TARFILE escrow-$ESCROW_VERSION 32 | 33 | echo Created tarfile in: $TARFILE 34 | echo 35 | echo will now try to open this in Finder on Mac 36 | 37 | open -R $TARFILE 2>/dev/null || true 38 | 39 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/kv-metrics.json: -------------------------------------------------------------------------------- 1 | { 2 | "kv_bg_batch_size": { 3 | "help": "Batch size for background fetches", 4 | "type": "gauge", 5 | "unit": "count" 6 | }, 7 | "kv_bg_load_seconds": { 8 | "help": "bg fetches waiting for disk", 9 | "type": "gauge", 10 | "unit": "seconds" 11 | }, 12 | "kv_bg_wait_seconds": { 13 | "help": "bg fetches waiting in the dispatcher queue", 14 | "type": "gauge", 15 | "unit": "seconds" 16 | }, 17 | "kv_cmd_duration_seconds": { 18 | "help": "", 19 | "type": "gauge", 20 | "unit": "seconds" 21 | }, 22 | "kv_cmd_lookup": { 23 | "help": "", 24 | "type": "gauge", 25 | "unit": "count" 26 | }, 27 | "kv_cmd_lookup_10s_count": { 28 | "help": "The number of lookup operations performed within the last 10 seconds", 29 | "type": "gauge", 30 | "unit": "count" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/report-tree-tree.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | {{#if $href}}{{/if}} 3 | {{@key}}{{#if $href}}{{/if}} 4 | 5 | {{#if $tag}} 6 | {{#with $githubUrl}} 7 | 14 | ⚑ 15 | {{#if $githubUrl}} 16 | 17 | {{else}} 18 | 19 | {{/if}} 20 | {{/if}} 21 | 22 | {{#if $children}} 23 |
      24 | {{#each $children}} 25 | {{> tree}} 26 | {{/each}} 27 |
    28 | {{/if}} 29 |
  • 30 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/extensions-flagged.adoc: -------------------------------------------------------------------------------- 1 | = Demo about the Feature Flag 2 | 3 | See https://github.com/couchbaselabs/docs-tooling/tree/main/flags for installation and more details. 4 | 5 | ifdef::flag-kitten[] 6 | NOTE: `DEBUG: flag-kitten` 7 | endif::flag-kitten[] 8 | 9 | ifdef::flag-cloud[] 10 | NOTE: `DEBUG: flag-cloud` 11 | endif::flag-cloud[] 12 | 13 | == How Couchbase Works 14 | 15 | Couchbase works very well. 16 | 17 | ifdef::flag-cloud[] 18 | Couchbase now LIVES IN THE CLOUD! 19 | endif::flag-cloud[] 20 | 21 | ifdef::flag-kitten[] 22 | Couchbase is powered by KITTENS! 23 | endif::flag-kitten[] 24 | 25 | ifdef::flag-cloud[] 26 | ifdef::flag-kitten[] 27 | The KITTENS are playing in the CLOUD! 28 | endif::flag-kitten[] 29 | endif::flag-cloud[] 30 | 31 | == Limitations 32 | 33 | * Blah blah 34 | 35 | ifndef::flag-kitten[] 36 | * Couchbase does not have a fluffy tummy. 37 | endif::flag-kitten[] 38 | 39 | ifndef::flag-cloud[] 40 | * Couchbase is not provisioned on demand in the cloud. 41 | endif::flag-cloud[] 42 | -------------------------------------------------------------------------------- /antora-playbook-chatbot.diff.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - ./lib/report-tree.js 4 | 5 | site: 6 | title: Couchbase Docs Chatbot 7 | url: https://chatbot-prod.docs.couchbase.com 8 | start_page: home::index.adoc 9 | robots: disallow 10 | keys: 11 | google_analytics: ~ 12 | 13 | content: 14 | 15 | $select: 16 | - '.' 17 | - '**' # everything 18 | # see https://github.com/micromatch/picomatch for full details 19 | # e.g. 20 | # - '**/*sdk*' # add all repos matching *sdk* 21 | 22 | # start off with first 3 branches 23 | $prune: 3 24 | 25 | sources: 26 | - url: https://github.com/couchbaselabs/cb-swagger 27 | branches: [capella] # ensure added as well as most recent release/* branches 28 | 29 | # ui: 30 | # bundle: 31 | # url: https://github.com/couchbase/docs-ui/releases/download/prod-216/ui-bundle.zip 32 | 33 | asciidoc: 34 | attributes: 35 | page-chatbot-origin: https://dfddckwnvn0ml.cloudfront.net # Production, via Elliot 36 | # page-chatbot-origin: https://d2tkqbbgxczr0v.cloudfront.net # Staging, via Elliot 37 | -------------------------------------------------------------------------------- /scripts/patch-preview-playbook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict' 4 | 5 | const path = require('node:path') 6 | const yaml = require('yaml') 7 | const fs = require('node:fs') 8 | const deepmerge = require('@fastify/deepmerge') 9 | 10 | const readYaml = (path) => 11 | fs.existsSync(path) && yaml.parse(fs.readFileSync(path).toString()) 12 | 13 | const playbook = readYaml('antora-playbook.yml') 14 | const diff = readYaml('antora-playbook.preview.diff.yml') 15 | 16 | function mergeArray(options) { 17 | return function (target, source) { 18 | return Array.from(new Set([...target, ...source])) 19 | } 20 | } 21 | 22 | const merge = deepmerge({ mergeArray }) 23 | 24 | const preview = merge( playbook, diff ) 25 | 26 | const header = `\###### 27 | # WARNING: DO NOT EDIT BY HAND 28 | # (it will get overwritten) 29 | # 30 | # Instead 31 | # 32 | # * edit antora-playbook.preview.diff.yml with just the *differences* from the main playbook 33 | # * run scripts/patch-preview-playbook \n\n` 34 | 35 | fs.writeFileSync( 36 | 'antora-playbook.preview.yml', 37 | header + yaml.stringify(preview), 38 | { encoding: 'utf8' }) 39 | 40 | -------------------------------------------------------------------------------- /scripts/preview-toc.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const handlebars = require('handlebars') 3 | const fs = require('fs') 4 | 5 | let json = JSON.parse(fs.readFileSync('builds.json')) 6 | const record = JSON.parse(fs.readFileSync('record.json')) 7 | 8 | const args = { 9 | actor: process.env.GH_ACTOR, 10 | subdir: process.env.PREVIEW_SUBDIR, 11 | date: process.env.GH_DATE, 12 | build_url: process.env.GH_BUILD_URL 13 | } 14 | 15 | json[args.subdir] = { 16 | firstbuild: args.date, 17 | ...(json[args.subdir] || {}), 18 | ...args, 19 | builds: json[args.subdir]?.builds + 1, 20 | ...record 21 | } 22 | 23 | fs.writeFileSync('builds.json', JSON.stringify(json)) 24 | 25 | const sortByRecent = (builds) => 26 | Object.entries(builds) 27 | .map(([k,v]) => ({...v, subdirectory: k})) 28 | .toSorted((a,b) => a.date > b.date ? -1 : (a.date === b.date ? 0 : 1)) 29 | 30 | handlebars.registerHelper('sortByRecent', sortByRecent) 31 | 32 | const template = handlebars.compile( 33 | fs.readFileSync("scripts/preview-toc.hbs").toString()) 34 | 35 | const page = template(json) 36 | fs.writeFileSync('builds.html', page) 37 | -------------------------------------------------------------------------------- /antora-playbook.preview2.diff.yml: -------------------------------------------------------------------------------- 1 | # RUN: 2 | # scripts/patch-cutdown-playbook antora-playbook.preview2 3 | 4 | antora: 5 | extensions: 6 | - ./lib/report-tree.js 7 | 8 | site: 9 | title: Couchbase Docs Preview 10 | robots: disallow 11 | 12 | content: 13 | $select: 14 | - '.' 15 | - '**/docs-ai' 16 | - '**/docs-columnar' 17 | 18 | sources: 19 | - url: https://github.com/couchbaselabs/docs-devex 20 | branches: [capella] 21 | 22 | - url: https://github.com/couchbasecloud/couchbase-cloud 23 | branches: [AV-117622_cmek-api] 24 | start_paths: [docs/public, docs/columnar] 25 | 26 | - url: https://github.com/couchbase/docs-capella 27 | branches: [AV-115233-azure-cmek-support] 28 | 29 | asciidoc: 30 | attributes: 31 | kroki-server-url: null 32 | page-show-preview-banner: false 33 | page-watermark: preview2@ 34 | # page-chatbot-origin: https://dfddckwnvn0ml.cloudfront.net # Production, via Elliot 35 | page-chatbot-origin: https://d2tkqbbgxczr0v.cloudfront.net # Staging, via Elliot 36 | 37 | #ui: 38 | #bundle: 39 | #url: https://github.com/couchbase/docs-ui/releases/download/prod-217/ui-bundle.zip 40 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/sky.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoSky Full Color 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs-site", 3 | "description": "Couchbase Documentation Site", 4 | "homepage": "https://docs.couchbase.com", 5 | "private": true, 6 | "dependencies": { 7 | "@antora/collector-extension": "^1.0.1", 8 | "@antora/pdf-extension": "^1.0.0-alpha.11", 9 | "@antora/site-generator-ms": "git+https://gitlab.com/opendevise/oss/antora-site-generator-ms#as-extension", 10 | "@asciidoctor/tabs": "1.0.0-beta.6", 11 | "@fastify/deepmerge": "^2.0.0", 12 | "@fortawesome/free-solid-svg-icons": "^7.1.0", 13 | "antora": "~3.1", 14 | "array.prototype.groupby": "^1.1.0", 15 | "asciidoctor-external-callout": "~1.2.2", 16 | "asciidoctor-kroki": "0.18.1", 17 | "gulp": "~5.0", 18 | "gulp-connect": "~5.7", 19 | "js-yaml": "~4.1", 20 | "jsdom": "^27.2.0", 21 | "markdown-it": "^13.0.1", 22 | "picomatch": "^4.0.3", 23 | "yaml": "^2.7.0" 24 | }, 25 | "devDependencies": { 26 | "cheerio": "^1.0.0", 27 | "mocha": "^11.5.0" 28 | }, 29 | "scripts": { 30 | "test": "mocha" 31 | }, 32 | "repository": { 33 | "type": "git", 34 | "url": "git+https://github.com/couchbase/docs-site.git" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/antora-component-version-rank.js: -------------------------------------------------------------------------------- 1 | /* 2 | * set the :page-version-rank: variable for each component, such that: 3 | * 4 | * current = 1 5 | * older = 2 6 | * older = 3 7 | * ... 8 | * 9 | * This variable will be composited into 10 | * and picked up by Algolia, to configure search results to prefer more recent 11 | * versions. 12 | */ 13 | 14 | module.exports.register = function () { 15 | this.once('contentClassified', ({ playbook, contentCatalog }) => { 16 | contentCatalog.getComponents().forEach((component) => { 17 | component.versions.forEach((componentVersion, index) => { 18 | const version_rank = index + 1 19 | // console.log(`${componentVersion.version}@${componentVersion.name}version-rank ${version_rank}`) 20 | 21 | // replace .asciidoc with a version that contains the new variable. 22 | // (because by default, the .asciidoc instance is shared.) 23 | componentVersion.asciidoc = { 24 | ...componentVersion.asciidoc, 25 | attributes: { 26 | ...componentVersion.asciidoc.attributes, 27 | 'page-version-rank': version_rank 28 | } 29 | } 30 | }) 31 | }) 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /scripts/preview-debug.scpt: -------------------------------------------------------------------------------- 1 | property theSubject : "Preview debug report" 2 | property BodyText : "See attached preview debug report" 3 | property theName : "Hakim Cassimally" 4 | property theEmail : "hakim.cassimally@couchbase.com" 5 | 6 | property att1: "/preview/debug.log" 7 | property att2: "/preview/doctor/antora-playbook.json" 8 | property att3: "/preview/doctor/tree.html" 9 | 10 | on run argv 11 | set pwd to (do shell script "pwd") 12 | 13 | set att1 to (pwd & att1) as POSIX file --convert to posix file 14 | set att2 to (pwd & att2) as POSIX file 15 | set att3 to (pwd & att3) as POSIX file 16 | 17 | tell application "/Applications/Microsoft Outlook.app" 18 | set theMsg to make new outgoing message 19 | set subject of theMsg to theSubject 20 | set plain text content of theMsg to BodyText 21 | 22 | tell theMsg 23 | make new attachment with properties {file:att1} 24 | make new attachment with properties {file:att2} 25 | make new attachment with properties {file:att3} 26 | end tell 27 | 28 | make new to recipient at theMsg with properties {email address:{name:theName, address:theEmail}} 29 | open theMsg 30 | activate 31 | end tell 32 | end run 33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/component-stats.js: -------------------------------------------------------------------------------- 1 | const {JSDOM} = require('jsdom') 2 | 3 | module.exports.register = function () { 4 | this.once('sitePublished', ({ playbook, contentCatalog }) => { 5 | contentCatalog.getComponents().forEach((component) => { 6 | component.versions.forEach((componentVersion, index) => { 7 | const pages = contentCatalog.getPages(it => it.src.component === componentVersion.name && it.src.version === componentVersion.version) 8 | 9 | const wc = pages.map(page => { 10 | const dom = new JSDOM(page.contents.toString()) 11 | const node = dom.window.document.querySelector('article') 12 | if (node) { 13 | return wordcount(node.textContent) 14 | } 15 | else { return 0 } 16 | }) 17 | console.log({ 18 | component: componentVersion.name, 19 | version: componentVersion.version, 20 | pages: pages.length, 21 | words: sum(wc) 22 | }) 23 | }) 24 | }) 25 | }) 26 | } 27 | 28 | function wordcount (words) { 29 | // very dumb wordcount function 30 | // won't deal gracefully with non-western scripts (which is fine for our use-case 31 | // as we don't have material content in those languages) 32 | return words.split(/\s+/).length 33 | } 34 | 35 | function sum (nums) { 36 | return nums.reduce( (a,b) => a+b, 0 ) 37 | } 38 | -------------------------------------------------------------------------------- /lib/inline-man-macro.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018 OpenDevise, Inc. 2 | * 3 | * This Source Code Form is subject to the terms of the Mozilla Public 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 | 7 | /** 8 | * Extends the AsciiDoc syntax to add support for the inline man(ual) macro. 9 | * This macro creates a link to a manual page that's suitable for the output 10 | * format. 11 | * 12 | * Usage: 13 | * 14 | * man:cbbackupmgr[1] 15 | * 16 | * The target must be located in the same directory as the source. 17 | * 18 | * @author Dan Allen 19 | */ 20 | const { posix: path } = require('path') 21 | 22 | function initInlineManMacro ({ file }) { 23 | return function () { 24 | this.process((parent, target, attrs) => { 25 | const text = target.startsWith('couchbase-cli-') ? target.substr(14) : target 26 | const refid = path.join(path.dirname(file.src.relative), target) 27 | const attributes = Opal.hash2(['refid', 'path'], { refid, path: refid + '.adoc' }) 28 | return this.createInline(parent, 'anchor', text, { type: 'xref', target: refid + '.adoc', attributes }) 29 | }) 30 | } 31 | } 32 | 33 | function register (registry, context) { 34 | registry.inlineMacro('man', initInlineManMacro(context)) 35 | } 36 | 37 | module.exports.register = register 38 | -------------------------------------------------------------------------------- /test/fixtures/antora-output/extensions-flagged.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |

    Demo about the Feature Flag

    4 | 5 |
    6 |
      7 |
      8 | 9 | 10 |
      11 |
      12 | 13 |
        14 | + 15 |
        16 |
        17 |
        18 |

        See https://github.com/couchbaselabs/docs-tooling/tree/main/flags for installation and more details.

        19 |
        20 |
        21 |
        22 |
        23 |

        How Couchbase Works

        24 |
        25 |
        26 |

        Couchbase works very well.

        27 |
        28 |
        29 |
        30 |
        31 |

        Limitations

        32 |
        33 |
        34 |
          35 |
        • 36 |

          Blah blah

          37 |
        • 38 |
        • 39 |

          Couchbase does not have a fluffy tummy.

          40 |
        • 41 |
        • 42 |

          Couchbase is not provisioned on demand in the cloud.

          43 |
        • 44 |
        45 |
        46 |
        47 |
        48 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/ebay.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoebay 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /home/modules/contribute/nav.adoc: -------------------------------------------------------------------------------- 1 | * xref:index.adoc[Overview] 2 | 3 | * Setting Up Your Workspace 4 | ** xref:install-git-and-editor.adoc[] 5 | ** xref:install-antora.adoc[] 6 | ** xref:set-up-repository.adoc[] 7 | 8 | * Contributing Workflow 9 | ** xref:workflow-overview.adoc[Overview] 10 | ** xref:repositories.adoc[] 11 | ** xref:create-branches.adoc[] 12 | ** xref:edit-pages.adoc[] 13 | ** xref:add-pages.adoc[] 14 | ** xref:update-nav.adoc[] 15 | ** xref:playbook.adoc[] 16 | ** xref:test-site.adoc[] 17 | ** xref:send-pr.adoc[] 18 | // ** Team Review Process 19 | // ** Revise Changes 20 | 21 | * Writing Documentation 22 | ** xref:asciidoc-overview.adoc[Overview] 23 | ** xref:pages.adoc[Standard Document Structure] 24 | ** xref:basics.adoc[AsciiDoc Basics] 25 | ** xref:cross-references.adoc[Cross References] 26 | *** xref:ids.adoc[IDs and Same-Page Cross References] 27 | ** xref:code-blocks.adoc[Code Blocks and Callouts] 28 | ** xref:tabs.adoc[] 29 | ** xref:attributes-and-roles.adoc[Attributes and Roles] 30 | ** xref:includes.adoc[Include Examples and Partials] 31 | 32 | * Conventions & Styles 33 | ** xref:component-configuration.adoc[Component Structure and Configuration] 34 | ** xref:nav-menus-and-files.adoc[Navigation Menus and Files] 35 | 36 | * Technical details 37 | ** xref:generate-rest-api.adoc[] 38 | ** xref:extensions.adoc[] 39 | 40 | 41 | //* Additional Resources (Pending) 42 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/admonitions.adoc: -------------------------------------------------------------------------------- 1 | // tag::basic[] 2 | TIP: Positional parameters are set using the `-args` query parameter. 3 | 4 | NOTE: Once a node has been successfully added, the Couchbase Server cluster indicates that a rebalance is required to complete the operation. 5 | 6 | IMPORTANT: The node names passed to the `nodes` parameter must include the cluster administration port (by default 8091). 7 | For example `WITH {"nodes": ["192.0.2.0:8091"]}` instead of `WITH {"nodes": ["192.0.2.0"]}`. 8 | 9 | WARNING: Never stop or restart Couchbase Server before you first remove that node from a cluster. 10 | 11 | CAUTION: Don't stick forks in power sockets. 12 | // end::basic[] 13 | 14 | // tag::compound[] 15 | [IMPORTANT] 16 | .Optional Title 17 | ==== 18 | Use an example block to create an admonition that contains compound content, such as: 19 | 20 | * Lists 21 | * Multiple paragraphs 22 | * Source code 23 | ==== 24 | // end::compound[] 25 | 26 | https://docs-staging.couchbase.com/server/5.1/n1ql/n1ql-language-reference/createindex.html 27 | [caption=Attention] 28 | IMPORTANT: We recommend that you do not create (or drop) secondary indexes when any node with a secondary index role is down as this may result in duplicate index names. 29 | 30 | TIP: For better scalability and throughput, we recommend that you set the value of the `stale` parameter to `ok`. 31 | With the stream-based views, data returned when `stale` is set to `ok` is closer to the key-value data, even though it might not include all of it. 32 | -------------------------------------------------------------------------------- /lib/json-config-ui-block-macro.js: -------------------------------------------------------------------------------- 1 | const BUNDLE_BASE_URL = 'https://couchbase-docs.s3.amazonaws.com/assets' 2 | const buildJsonConfigUi = ({ configUrl, version, bundleBaseUrl }) => 3 | ` 4 | 5 | ` 13 | 14 | function blockJsonConfigUiMacro ({ file }) { 15 | return function () { 16 | this.process((parent, configUrl, attrs) => { 17 | const doc = parent.getDocument() 18 | if (~configUrl.indexOf('{')) { 19 | configUrl = doc.$sub_attributes(configUrl, Opal.hash({ attribute_missing: 'drop-line' })) 20 | if (!configUrl) return 21 | } 22 | const contentScripts = buildJsonConfigUi({ configUrl, version: attrs.version, bundleBaseUrl: BUNDLE_BASE_URL }) 23 | file.asciidoc.attributes['page-content-scripts'] = contentScripts 24 | return this.createBlock(parent, 'pass', '
        ') 25 | }) 26 | } 27 | } 28 | 29 | function register (registry, context) { 30 | registry.blockMacro('json_config_ui', blockJsonConfigUiMacro(context)) 31 | } 32 | 33 | module.exports.register = register 34 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/workflow-overview.adoc: -------------------------------------------------------------------------------- 1 | = Workflow Overview 2 | 3 | Use the following as a quick reference for the general workflow for contributing to Couchbase Documentation. 4 | 5 | NOTE: Contributors from outside Couchbase need to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo[fork documentation repositories^] to contribute changes. 6 | If you're a Couchbase employee, DO NOT fork repositories to contribute to Couchbase Documentation. 7 | 8 | To set up to contribute to Couchbase Documentation, you must: 9 | 10 | * [x] Clone a repository onto your computer. 11 | 12 | To make a contribution or change to Couchbase Documentation, you must: 13 | 14 | * [x] xref:repositories.adoc[Review each repository's requirements]. 15 | * [x] xref:create-branches.adoc#base-branch[Choose a base branch]. 16 | * [x] xref:create-branches.adoc[Create a working branch for your changes]. 17 | * [x] xref:edit-pages.adoc[Fix existing documentation] or xref:add-pages.adoc[create a new documentation page]. 18 | * [x] xref:test-site.adoc[Build the site locally and test your changes]. 19 | * [x] xref:send-pr.adoc#commit[Commit and push your changes]. 20 | * [x] xref:send-pr.adoc#pr[Submit a pull request]. 21 | * [x] Make requested changes to your pull request. 22 | * [x] Merge your pull request. 23 | * [x] Delete your working branch. 24 | 25 | IMPORTANT: Always try to delete old, unmerged branches or branches that you have merged with a pull request (PR) when you're done with them. 26 | This keeps our repositories tidy. -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const connect = require('gulp-connect') 4 | const fs = require('fs') 5 | const generator = require('@antora/site-generator') 6 | const { reload: livereload } = process.env.LIVERELOAD === 'true' ? require('gulp-connect') : {} 7 | const { series, src, watch } = require('gulp') 8 | const yaml = require('js-yaml') 9 | 10 | const playbookFilename = 'local-antora-playbook.yml' 11 | const playbook = yaml.load(fs.readFileSync(playbookFilename, 'utf8')) 12 | const outputDir = (playbook.output || {}).dir || './build/site' 13 | const serverConfig = { name: 'Preview Site', livereload, port: 5000, root: outputDir } 14 | const antoraArgs = ['--playbook', playbookFilename] 15 | const watchPatterns = playbook.content.sources.filter((source) => !source.url.includes(':')).reduce((accum, source) => { 16 | accum.push(`${source.url}/${source.start_path ? source.start_path + '/' : ''}antora.yml`) 17 | accum.push(`${source.url}/${source.start_path ? source.start_path + '/' : ''}**/*.adoc`) 18 | return accum 19 | }, []) 20 | 21 | function generate (done) { 22 | generator(antoraArgs, process.env) 23 | .then(() => done()) 24 | .catch((err) => { 25 | console.log(err) 26 | done() 27 | }) 28 | } 29 | 30 | function serve (done) { 31 | connect.server(serverConfig, function () { 32 | this.server.on('close', done) 33 | watch(watchPatterns, generate) 34 | if (livereload) watch(this.root).on('change', (filepath) => src(filepath, { read: false }).pipe(livereload())) 35 | }) 36 | } 37 | 38 | module.exports = { serve, generate, default: series(generate, serve) } 39 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/bd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoBD Full Color 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/inline-jira-macro.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Extends the AsciiDoc syntax to add support for the inline jira macro. 3 | * 4 | * Usage: 5 | * 6 | * jira:DOC-1234[] 7 | * jira:DOC-1234[Optional link text] 8 | * 9 | * @author Hakim Cassimally 10 | * Dan Allen 11 | */ 12 | 13 | function initInlineJiraMacro ({ mapping }) { 14 | return function () { 15 | this.parseContentAs('text') 16 | this.process((parent, ref, attrs) => { 17 | let [handle, id] = ref.split('-') 18 | 19 | const url = (mapping[handle] || mapping.__DEFAULT__) + '/' + ref 20 | const text = attrs['text'] || ref 21 | 22 | return this.createInline(parent, 'anchor', text, { type: 'link', target: url }) 23 | }) 24 | } 25 | } 26 | 27 | function register (registry, context) { 28 | const { config: { attributes } } = context 29 | 30 | const mapping = Object.entries(attributes).reduce((accum, [name, url]) => { 31 | /* 32 | * parse out entries like: 33 | * url-issues 34 | * url-issues- 35 | * 36 | * We then add these to the accumulated mapping like { handle: url } 37 | */ 38 | const match = name.match(/^url-issues(-(?.*))?$/) 39 | if (match) { 40 | const handle = match.groups.handle || '__DEFAULT__' 41 | accum[handle] = url 42 | } 43 | return accum 44 | }, { __DEFAULT__: 'https://issues.couchbase.com/browse' }) 45 | 46 | const contextWithMapping = Object.assign({ mapping }, context) 47 | registry.inlineMacro('jira', initInlineJiraMacro(contextWithMapping)) 48 | } 49 | 50 | module.exports.register = register 51 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/tommy-hilfiger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoTommy Hilfiger 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/asciidoc-overview.adoc: -------------------------------------------------------------------------------- 1 | :page-status: OUT OF DATE 2 | 3 | = Writing Documentation Overview 4 | 5 | NOTE: {out-of-date} 6 | 7 | == AsciiDoc and Asciidoctor 8 | 9 | The Couchbase documentation is written using AsciiDoc. 10 | AsciiDoc is a lightweight markup language that supports the structural and semantic elements necessary for writing web-first, technical documentation. 11 | You can write an AsciiDoc document using Atom, VS Code, or your preferred plain text editor. 12 | 13 | If a document contains incorrect AsciiDoc syntax, you'll see a warning message that starts with `asciidoctor` when you build the site. 14 | 15 | asciidoctor: WARNING: backup-and-restore.adoc: line 12: invalid style for listing block: code 16 | 17 | Asciidoctor is the AsciiDoc parser. 18 | It reports the syntax errors it encounters when converting the documents to HTML. 19 | 20 | == Predefined Attributes and Roles 21 | 22 | The Couchbase documentation uses a number of predefined AsciiDoc attributes and roles. 23 | These attributes and roles add custom metadata and special processing or styling behaviors to certain pages. 24 | 25 | == Learn More 26 | 27 | * xref:pages.adoc[Learn how to name and structure an AsciiDoc document]. 28 | * xref:basics.adoc[Mark up common content elements, like lists and tables, with AsciiDoc]. 29 | * xref:basics.adoc#images[Insert an image]. 30 | * xref:cross-references.adoc[Create document-to-document cross references]. 31 | * xref:code-blocks.adoc[Add source code examples to a document]. 32 | * xref:tabs.adoc[Create a tabs set]. 33 | 34 | == Additional Resources 35 | 36 | The https://asciidoctor.org/[Asciidoctor project^] maintains and releases AsciiDoc under the MIT license. 37 | //It is the native markup language of Antora. 38 | -------------------------------------------------------------------------------- /test/test-build.js: -------------------------------------------------------------------------------- 1 | // this test file is designed to be run with Mocha 2 | const assert = require('assert') 3 | const fs = require('fs') 4 | const ok = specify 5 | const { spawnSync } = require('node:child_process') 6 | const cheerio = require('cheerio') 7 | 8 | describe('antora build with extensions', function () { 9 | 10 | before('run the antora build', function () { 11 | this.timeout(10000) // increase timeout for the Antora build 12 | spawnSync('antora', [ 13 | '--log-level', 'fatal', 14 | '--to-dir', 'test/build', 15 | 'antora-playbook-test.yml'], 16 | {'stdio': 'inherit'}) 17 | }) 18 | 19 | const files = 20 | fs.readdirSync('test/fixtures/antora-output/').filter( 21 | file => file.match(/^extension.*\.html$/)) 22 | 23 | for (const file of files) { 24 | 25 | ok(`test file ${file}`, function () { 26 | const expected = fs.readFileSync(`test/fixtures/antora-output/${file}`, 'utf8') 27 | 28 | let actualHtml 29 | try { 30 | const actual = fs.readFileSync(`test/build/home/contribute/${file}`, 'utf8') 31 | 32 | const $ = cheerio.load(actual) 33 | actualHtml = $('article').html() 34 | } 35 | catch (err) { 36 | // We expect some files to NOT exist (e.g. to test embargoed content) 37 | // so we just return an empty string. 38 | // This means we can test the embargoed content by supplying a 39 | // zero-length fixture. 40 | // console.error(`Error reading actual file for ${file}:`, err) 41 | actualHtml = '' 42 | } 43 | fs.writeFileSync(`test/fixtures/antora-output/${file}.actual`, actualHtml) 44 | 45 | assert.equal(actualHtml, expected) 46 | }) 47 | } 48 | }) 49 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/install-antora.adoc: -------------------------------------------------------------------------------- 1 | = Install Antora 2 | 3 | :antora-version: 3.1 4 | :url-docs-antora: https://docs.antora.org/antora/latest 5 | :url-linux: {url-docs-antora}/install/linux-requirements/ 6 | :url-macos: {url-docs-antora}/install/macos-requirements/ 7 | :url-windows: {url-docs-antora}/install/windows-requirements/ 8 | :url-install: {url-docs-antora}/install/install-antora/ 9 | 10 | == Install System Prerequisites 11 | 12 | Antora runs on all Linux distributions, macOS, and Windows. 13 | If you have never used Antora, you may first need to install Node using nvm. 14 | Follow the installation instructions for all Antora prerequisites for your operating system: 15 | 16 | * {url-linux}[Linux: Install Node^] 17 | * {url-macos}[macOS: Install Node^] 18 | * {url-windows}[Windows: Install Node^] 19 | 20 | == Install the Antora CLI and Site Generator 21 | 22 | To generate the Couchbase documentation, you need the Antora command line interface (CLI) and the Antora site generator. 23 | 24 | To install the CLI and the site generator: 25 | 26 | . Open a terminal window. 27 | . Copy and paste the following command and press kbd:[Enter]: 28 | + 29 | [source, console, subs=+attributes] 30 | ---- 31 | npm i -g @antora/cli@{antora-version} @antora/site-generator@{antora-version} 32 | ---- 33 | + 34 | This installs the Antora CLI and site generator globally on your computer. 35 | 36 | . Copy and paste the following command and press kbd:[Enter]: 37 | + 38 | [source,console] 39 | -- 40 | $ antora -v 41 | -- 42 | + 43 | This checks that Antora is available on your PATH. 44 | If installation was successful, you should see the Antora version number displayed in your terminal window. 45 | 46 | == Next Step 47 | 48 | xref:playbook.adoc[Get the Couchbase documentation site playbook]. 49 | -------------------------------------------------------------------------------- /docsearch/Jenkinsfile: -------------------------------------------------------------------------------- 1 | #!/bin/env groovy 2 | 3 | // Jenkins job configuration 4 | // ------------------------- 5 | // Category: Multibranch Pipeline 6 | // Pipeline name: docs-search-indexer 7 | // Branch Sources: Single repository & branch 8 | // Name: master 9 | // Source Code Management: Git 10 | // Repository URL: https://github.com/couchbase/docs-site 11 | // Credentials: - none - 12 | // Refspec: +refs/heads/master:refs/remotes/origin/master 13 | // Branch specifier: refs/heads/master 14 | // Advanced clone behaviors: [ ] Fetch tags, [x] Honor refspec on initial clone, [x] Shallow clone (depth: 3) 15 | // Build Configuration: 16 | // Mode: by Jenkinsfile 17 | // Script Path: docsearch/Jenkinsfile 18 | pipeline { 19 | agent { 20 | dockerfile { 21 | dir 'docsearch' 22 | filename 'Dockerfile.jenkins' 23 | additionalBuildArgs '--build-arg GROUP_ID=$(id -g) --build-arg USER_ID=$(id -u)' 24 | } 25 | } 26 | environment { 27 | CONFIG="${env.WORKSPACE}/docsearch/docsearch-config.json" 28 | HOME='/docsearch' 29 | INDEX_NAME_TMP="$BUILD_TAG" 30 | PIPENV_HIDE_EMOJIS=true 31 | PIPENV_NOSPIN=true 32 | UPDATE_NB_HITS=false 33 | } 34 | stages { 35 | stage('Install') { 36 | steps { 37 | sh '(cd $HOME && pipenv install)' 38 | } 39 | } 40 | stage('Generate Config') { 41 | steps { 42 | sh '(curl -sL https://docs.couchbase.com/site-manifest.json | npx -p hbs-cli -p glob@8 hbs -H "$PWD/docsearch/hbs-helpers/*.js" -i -s $CONFIG.hbs > $CONFIG)' 43 | } 44 | } 45 | stage('Run') { 46 | steps { 47 | configFileProvider([configFile(fileId: 'algolia-application-credentials', targetLocation: '.env')]) { 48 | sh '(mv .env $HOME/ && cd $HOME && pipenv run python -m src.index)' 49 | } 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/code-blocks.adoc: -------------------------------------------------------------------------------- 1 | // tag::dl-co[] 2 | .Optional title 3 | [source,java] 4 | ---- 5 | KStreamBuilder builder = new KStreamBuilder(); 6 | 7 | KStream source = builder 8 | .stream("streaming-topic-beer-sample"); 9 | ---- 10 | // end::dl-co[] 11 | 12 | // tag::dl[] 13 | .Optional title 14 | [source,java] 15 | ---- 16 | KStreamBuilder builder = new KStreamBuilder(); 17 | 18 | KStream source = builder 19 | .stream("streaming-topic-beer-sample"); 20 | ---- 21 | // end::dl[] 22 | 23 | // tag::console[] 24 | [source,console] 25 | ---- 26 | $ curl GET -u admin:password http://ip.for.destination.cluster:8091/pools/default/buckets 27 | ---- 28 | // end::console[] 29 | 30 | // tag::single[] 31 | [source,sql] 32 | SELECT country FROM `travel-sample` WHERE name = "Excel Airways"; 33 | // end::single[] 34 | 35 | // tag::callouts[] 36 | [source,javascript] 37 | ---- 38 | function OnUpdate(doc, meta) { 39 | var strong = 70; 40 | var stmt = 41 | SELECT * // <1> 42 | FROM `beer-samples` // <2> 43 | WHERE abv > $strong; 44 | for (var beer of stmt) { // <3> 45 | break; // <4> 46 | } 47 | } 48 | ---- 49 | <1> N1QL queries are embedded directly. 50 | <2> Token escaping is standard N1QL style. 51 | <3> Stream results using 'for' iterator. 52 | <4> Cancel streaming query by breaking out. 53 | // end::callouts[] 54 | 55 | // tag::group-code-blocks[] 56 | ==== 57 | [source,n1ql] 58 | ---- 59 | SELECT CONTAINS("N1QL is awesome", "N1QL") as n1ql, 60 | CONTAINS("N1QL is awesome", "SQL") as no_sql; 61 | ---- 62 | 63 | [source,json] 64 | ---- 65 | { 66 | "results": [ 67 | { 68 | "n1ql": true, 69 | "no_sql": false 70 | } 71 | ] 72 | } 73 | ---- 74 | ==== 75 | // end::group-code-blocks[] 76 | -------------------------------------------------------------------------------- /home/modules/ROOT/pages/integrations.adoc: -------------------------------------------------------------------------------- 1 | = Big Data Integration Using Couchbase Connectors 2 | :page-layout: landing-page-top-level-sdk 3 | :page-role: tiles 4 | :page-rank: 75 5 | :!sectids: 6 | 7 | include::partial$info-banner.adoc[] 8 | 9 | = Couchbase Connectors 10 | ++++ 11 |
        12 | ++++ 13 | 14 | [.column] 15 | ====== {empty} 16 | [.content] 17 | Couchbase Connectors enable you to exchange data with a number of other platforms. 18 | 19 | [.column] 20 | ====== {empty} 21 | [.media-left] 22 | image::bigdata-elasticsearch-comp.png[,300] 23 | 24 | ++++ 25 |
        26 | ++++ 27 | 28 | == Big Data Connectors 29 | ++++ 30 |
        31 | ++++ 32 | 33 | [.column] 34 | .Elasticsearch 35 | * xref:elasticsearch-connector::getting-started.adoc[Get Started] 36 | * xref:elasticsearch-connector::configuration.adoc[Configuration] 37 | * xref:elasticsearch-connector::migration.adoc[Migrating from Elasticsearch Plug-in] 38 | 39 | [.column] 40 | .Kafka 41 | * xref:kafka-connector::quickstart.adoc[Get Started] 42 | * xref:kafka-connector::source-configuration-options.adoc[Source Configuration] 43 | * xref:kafka-connector::sink-configuration-options.adoc[Sink Configuration] 44 | * xref:kafka-connector::streams-sample.adoc[Sample Application with Kafka Steams] 45 | 46 | [.column] 47 | .Spark 48 | * xref:spark-connector::getting-started.adoc[Get Started] 49 | * xref:spark-connector::dev-workflow.adoc[Development Workflow] 50 | * xref:spark-connector::java-api.adoc[Java API] 51 | 52 | [.column] 53 | .ODBC and JDBC Drivers 54 | 55 | [.content] 56 | ODBC and JDBC drivers enable any application based on the ODBC/JDBC standards, for example Microsoft Excel, QlikView, SAP Lumira, or Tableau, to connect to a Couchbase Server or cluster. 57 | {empty} 58 | xref:server:connectors:odbc-jdbc-drivers.adoc[ODBC and JDBC Drivers] 59 | 60 | 61 | ++++ 62 |
        63 | ++++ 64 | -------------------------------------------------------------------------------- /scripts/preview-toc.hbs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 28 | 29 |

        Preview builds

        30 | 31 | See the Docs team demo site passwords page for access. 32 | 33 | (If you are outside Couchbase, and do not have access to Confluence, please ask your Couchbase contact if you believe you should have access to a private preview.) 34 | 35 |

        Most recent builds

        36 | 37 |
        38 | {{#each (sortByRecent this)}} 39 |
        {{subdirectory}}
        40 |
        41 | Last built {{date}} by {{actor}} 42 | ({{builds}} builds since {{firstbuild}}) 43 | (🛠 44 | 🏗) 45 | 46 | {{#if pagesForReview.[0]}} 47 |
          48 | {{#each pagesForReview}} 49 |
        • {{$title}} 50 | ()
        • 51 | {{/each}} 52 |
        53 | {{/if}} 54 | 55 | {{#with pr}} 56 |

        GitHub PR #{{number}}: {{title}} 57 | by {{author.name}} ({{state}} {{updatedAt}})

        58 |
        59 | {{{body}}} 60 |
        61 | {{/with}} 62 |
        63 | {{/each}} 64 |
        65 | 66 | -------------------------------------------------------------------------------- /etc/s3/bucket-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Id": "Policy1488222338812", 4 | "Statement": [ 5 | { 6 | "Sid": "Stmt1532387574773", 7 | "Effect": "Allow", 8 | "Principal": { 9 | "AWS": "*" 10 | }, 11 | "Action": "s3:GetObject", 12 | "Resource": [ 13 | "arn:aws:s3:::docs.couchbase.com/index.html", 14 | "arn:aws:s3:::docs.couchbase.com/sitemap*.xml", 15 | "arn:aws:s3:::docs.couchbase.com/site-manifest.json", 16 | "arn:aws:s3:::docs.couchbase.com/_/*", 17 | "arn:aws:s3:::docs.couchbase.com/*-sdk/*", 18 | "arn:aws:s3:::docs.couchbase.com/*-connector/*", 19 | "arn:aws:s3:::docs.couchbase.com/cloud/*", 20 | "arn:aws:s3:::docs.couchbase.com/cloud-native-database/*", 21 | "arn:aws:s3:::docs.couchbase.com/couchbase-lite/*", 22 | "arn:aws:s3:::docs.couchbase.com/cxx-txns/*", 23 | "arn:aws:s3:::docs.couchbase.com/home/*", 24 | "arn:aws:s3:::docs.couchbase.com/operator/*", 25 | "arn:aws:s3:::docs.couchbase.com/sdk/*", 26 | "arn:aws:s3:::docs.couchbase.com/sdk-api/*", 27 | "arn:aws:s3:::docs.couchbase.com/sdk-common/*", 28 | "arn:aws:s3:::docs.couchbase.com/sdk-extensions/*", 29 | "arn:aws:s3:::docs.couchbase.com/server/*", 30 | "arn:aws:s3:::docs.couchbase.com/service-broker/*", 31 | "arn:aws:s3:::docs.couchbase.com/shared-mobile/*", 32 | "arn:aws:s3:::docs.couchbase.com/sync-gateway/*", 33 | "arn:aws:s3:::docs.couchbase.com/tutorials/*", 34 | "arn:aws:s3:::docs.couchbase.com/userprofile-couchbase-mobile/*" 35 | ] 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/pge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | white logopg&amp;e 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /antora-playbook-test.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - '@antora/site-generator-ms' 4 | - ./lib/embargo.js 5 | - ./lib/antora-component-version-rank.js 6 | site: 7 | title: Couchbase Test build for testing extensions 8 | url: https://docs.couchbase.com 9 | start_page: home::index.adoc 10 | robots: disallow 11 | keys: 12 | google_analytics: GTM-MVPNN2 13 | nav_groups: | 14 | [ 15 | ] 16 | git: 17 | ensure_git_suffix: false 18 | fetch_concurrency: 1 19 | urls: 20 | latest_version_segment_strategy: redirect:to 21 | latest_version_segment: current 22 | content: 23 | branches: master 24 | sources: 25 | - url: . 26 | branches: HEAD 27 | start_path: home 28 | asciidoc: 29 | attributes: 30 | site-navigation-data-path: _/js/site-navigation-data.js 31 | enable-cmos: '' 32 | max-include-depth: 10 33 | page-partial: false 34 | experimental: '' 35 | idprefix: '@' 36 | idseparator: '-@' 37 | tabs: tabs 38 | tabs-sync-option: '' 39 | toc: ~ 40 | page-toclevels: 1@ 41 | page-rank: 50@ 42 | xrefstyle: short 43 | enterprise: https://www.couchbase.com/products/editions[ENTERPRISE EDITION] 44 | community: https://www.couchbase.com/products/editions[COMMUNITY EDITION] 45 | sqlpp: SQL++ 46 | sqlppc: SQL++ for Capella columnar 47 | sqlpp_url: https://www.couchbase.com/products/n1ql 48 | cbpp: Couchbase++ 49 | kroki-server-url: null 50 | kroki-fetch-diagram: true 51 | extensions: 52 | - ./lib/source-url-include-processor.js 53 | - ./lib/json-config-ui-block-macro.js 54 | - ./lib/inline-man-macro.js 55 | - ./lib/multirow-table-head-tree-processor.js 56 | - ./lib/swagger-ui-block-macro.js 57 | - ./lib/markdown-block.js 58 | - ./lib/template-block.js 59 | - asciidoctor-kroki 60 | - asciidoctor-external-callout 61 | - '@asciidoctor/tabs' 62 | ui: 63 | bundle: 64 | url: https://github.com/couchbase/docs-ui/releases/download/prod-210/ui-bundle.zip 65 | output: 66 | dir: ./public 67 | runtime: 68 | fetch: true 69 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/extensions.adoc: -------------------------------------------------------------------------------- 1 | = Site Extensions 2 | 3 | Test and document your Asciidoctor.js or Antora extensions here. 4 | 5 | //// 6 | == Inline JIRA macro 7 | 8 | === Usage 9 | 10 | [source,asciidoc] 11 | ---- 12 | == Fixed issues: 13 | 14 | * jira:JSCBC-1234[]: reversed the polarity of the neutron flow 15 | * jira:AV-2345[]: frobnicated the gostaks 16 | * jira:DOC-999[The dreaded DOC-999 ticket...]: implemented jira macro 17 | ---- 18 | 19 | [source,yml] 20 | .antora-playbook.yml 21 | ---- 22 | asciidoc: 23 | attributes: 24 | # ... 25 | url-issues: https://issues.couchbase.com/browse 26 | url-issues-JSCBC: https://issues.couchbase.com/browse 27 | url-issues-AV: https://couchbasecloud.atlassian.net/browse 28 | extensions: 29 | # ... 30 | - ./lib/inline-jira-macro.js 31 | ---- 32 | 33 | === Output 34 | 35 | ==== Fixed issues: 36 | 37 | * jira:JSCBC-1234[]: reversed the polarity of the neutron flow 38 | * jira:AV-2345[]: frobnicated the gostaks 39 | * jira:DOC-999[The dreaded DOC-999 ticket...]: implemented jira macro 40 | //// 41 | 42 | == Markdown Block 43 | 44 | [source,asciidoc] 45 | ---- 46 | [markdown] 47 | -- 48 | Filter some text with [Markdown](https://commonmark.org/help/) syntax. 49 | -- 50 | ---- 51 | 52 | Results in: 53 | 54 | [markdown] 55 | -- 56 | Filter some text with [Markdown](https://commonmark.org/help/) syntax. 57 | -- 58 | 59 | 60 | [NOTE] 61 | -- 62 | This is not implemented with a full Markdown parser. 63 | See link:https://github.com/asciidoctor/kramdown-asciidoc/issues/7[issue] 64 | with a link to the "naive series of regexes" used as starting point. 65 | 66 | (And note that we use Open 67 | link:https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/#summary-of-structural-containers[structural context], 68 | with `--` delimiters, and headings don't work inside these.) 69 | 70 | This feature is intended for handling OpenAPI specs, which can contain Markdown, 71 | however openapi-generator has link:https://github.com/OpenAPITools/openapi-generator/issues/11396[poor Asciidoc handling], 72 | so instead we add the block delimiters in the template, and let the block filter handle it. 73 | -- 74 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/verizon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoVerizon 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoLinkedin 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /home/modules/ROOT/pages/mobile.adoc: -------------------------------------------------------------------------------- 1 | = Couchbase Mobile - Embedded Database on the Edge 2 | :page-layout: landing-page-top-level-sdk 3 | :page-role: tiles 4 | :page-rank: 75 5 | :!sectids: 6 | 7 | include::partial$info-banner.adoc[] 8 | 9 | = Couchbase Mobile 10 | 11 | ++++ 12 |
        13 | ++++ 14 | 15 | [.column] 16 | ====== {empty} 17 | [.content] 18 | _Couchbase Mobile_ brings the power of NoSQL to the edge. 19 | The combination of _Sync Gateway_ and _Couchbase Lite_ coupled with the power of _Couchbase Server_ provides fast, efficient bidirectional synchronization of data between the edge and the cloud. 20 | Enabling you to deploy your offline-first mobile and embedded applications with greater agility on premises or in any cloud. 21 | 22 | [.column] 23 | ====== {empty} 24 | [.media-left] 25 | image::secure-manage-and-develop-with-ease.svg[,275] 26 | 27 | ++++ 28 |
        29 | ++++ 30 | 31 | == Embedded Database on the Edge 32 | ++++ 33 |
        34 | ++++ 35 | 36 | [.column] 37 | .Couchbase Lite 38 | 39 | [.content] 40 | Couchbase Lite is an embedded, NoSQL JSON Document Style database for your mobile apps. 41 | It natively supports all major operating systems and platforms. 42 | Its NoSQL client database provides CRUD, full-text search and query capabilities that runs locally on the device. + 43 | xref:couchbase-lite::introduction.adoc[Go to Couchbase Lite Docs] 44 | 45 | [.column] 46 | .Sync Gateway 47 | 48 | [.content] 49 | Sync Gateway is an internet-facing synchronization mechanism designed to provide data synchronization for large-scale interactive web, mobile, and IoT applications. + 50 | xref:sync-gateway::introduction.adoc[Go to Sync Gateway Docs] 51 | 52 | [.column] 53 | .Edge Server 54 | 55 | [.content] 56 | Edge Server is a lightweight standalone database for resource-constrained edge. 57 | It exposes a REST API that enables you to get database information, perform document operations, run {sqlpp} queries, and manage change feeds and replication. + 58 | xref:couchbase-edge-server:introduction:intro.adoc[Go to Edge Server Docs] 59 | 60 | [.column] 61 | .Tutorials 62 | 63 | [.content] 64 | Sample tutorials to build Mobile applications on the edge. + 65 | https://developer.couchbase.com/tutorials[Couchbase Mobile Tutorials] 66 | 67 | ++++ 68 |
        69 | ++++ 70 | -------------------------------------------------------------------------------- /test/fixtures/antora-output/extensions.html: -------------------------------------------------------------------------------- 1 | 2 |
        3 |

        Site Extensions

        4 | 5 |
        6 |
          7 |
          8 | 9 | 10 |
          11 |
          12 | 13 |
            14 | + 15 |
            16 |
            17 |
            18 |

            Test and document your Asciidoctor.js or Antora extensions here.

            19 |
            20 |
            21 |
            22 |
            23 |

            Markdown Block

            24 |
            25 |
            26 |
            27 |
            [markdown]
            28 | --
            29 | Filter some text with [Markdown](https://commonmark.org/help/) syntax.
            30 | --
            31 |
            32 |
            33 |
            34 |

            Results in:

            35 |
            36 |
            37 |
            38 |

            Filter some text with Markdown syntax.

            39 |
            40 |
            41 |
            42 | 43 | 44 | 47 | 64 | 65 |
            45 | 46 | 48 |
            49 |

            This is not implemented with a full Markdown parser. 50 | See issue 51 | with a link to the "naive series of regexes" used as starting point.

            52 |
            53 |
            54 |

            (And note that we use Open 55 | structural context, 56 | with -- delimiters, and headings don’t work inside these.)

            57 |
            58 |
            59 |

            This feature is intended for handling OpenAPI specs, which can contain Markdown, 60 | however openapi-generator has poor Asciidoc handling, 61 | so instead we add the block delimiters in the template, and let the block filter handle it.

            62 |
            63 |
            66 |
            67 |
            68 |
            69 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/directv.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoDIRECTV 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /home/modules/ROOT/pages/cloud.adoc: -------------------------------------------------------------------------------- 1 | = Welcome to Couchbase Capella 2 | :page-layout: landing-page-capella 3 | :tabs: 4 | :page-rank: 85 5 | :!sectids: 6 | :icons: font 7 | :page-nav-header-levels: 2 8 | :page-aliases: cloud::index.adoc 9 | :page-for-review: 10 | 11 | include::home::partial$info-banner.adoc[] 12 | 13 | = Welcome to Couchbase Capella 14 | 15 | Capella operational is the easiest way to use Couchbase Server. 16 | Get access to SQL-like querying, full-text and vector search, powerful eventing, and connectivity to mobile and IoT devices at the edge. 17 | 18 | Capella Analytics is an analytical database (RT-OLAP) for real-time apps and operational intelligence. 19 | Capella Analytics is a standalone, cloud-only offering from Couchbase under the Capella family of products. 20 | 21 | Capella AI Services is a fully managed set of tools that help you build, deploy, and scale your agentic and retrieval-augmented generation (RAG) AI applications. 22 | 23 | [.centered.card-container] 24 | == Explore Couchbase Capella 25 | 26 | [.card-box] 27 | === icon:database[] Get Started With Capella Operational 28 | 29 | Get set up with an account and deploy a free tier Capella operational cluster. 30 | 31 | * https://cloud.couchbase.com/sign-up[Sign Up^] 32 | * xref:cloud:get-started:intro.adoc[] 33 | * xref:cloud:get-started:create-account.adoc[] 34 | * xref:cloud:get-started:run-first-queries.adoc[] 35 | * xref:cloud:get-started:sdk-playground.adoc[] 36 | * xref:cloud:get-started:configuring-app-services.adoc[] 37 | 38 | 39 | [.card-box] 40 | === icon:analytics[] Get Started With Capella Analytics 41 | 42 | Create your account and follow our tutorial on how to load data into your Analytics cluster. 43 | 44 | * https://cloud.couchbase.com/sign-up[Sign Up^] 45 | * xref:analytics:intro:intro.adoc[] 46 | * xref:analytics:admin:prepare-project.adoc[] 47 | * xref:analytics:intro:examples.adoc[] 48 | * xref:analytics:query:workbench.adoc[] 49 | 50 | [.card-box] 51 | === icon:stars[] Get Started With Capella AI Services 52 | 53 | Create your account and start working with Capella AI Services. 54 | 55 | * https://cloud.couchbase.com/sign-up[Sign Up^] 56 | * xref:ai:get-started:intro.adoc[] 57 | * xref:ai:build:vectorization-service/data-processing.adoc[] 58 | * xref:ai:build:model-service/deploy-llm-model.adoc[] 59 | * xref:ai:build:model-service/deploy-embed-model.adoc[] 60 | * xref:ai:build:integrate-agent-with-catalog.adoc[] 61 | * xref:ai:build:ai-functions.adoc[] 62 | 63 | -------------------------------------------------------------------------------- /lib/site-stats-extension.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports.register = function () { 4 | this.once('sitePublished', ({ contentCatalog, siteCatalog, uiCatalog }) => { 5 | const files = [contentCatalog, siteCatalog, uiCatalog] 6 | .reduce((accum, catalog) => accum.concat(catalog.getFiles().filter(({ out }) => out)), []) 7 | printReport(collectStats(files)) 8 | }) 9 | } 10 | 11 | function collectStats (files) { 12 | let pages = 0 13 | let images = {} 14 | let attachments = 0 15 | let aliases = 0 16 | let aux = 0 17 | let ui = 0 18 | let size = 0 19 | files.forEach((file) => { 20 | const { out, stat, src = {} } = file 21 | if (stat) size += stat.size // not set for aliases and some generated files 22 | if (out.path.startsWith('_/')) src.family = 'ui' 23 | switch (src.family) { 24 | case 'page': 25 | pages++ 26 | break 27 | case 'image': 28 | if (!file.path) file.path = out.path // images generated by Asciidoctor Kroki 29 | const extname = file.extname.toLowerCase() 30 | images[extname] = (images[extname] || 0) + 1 31 | break 32 | case 'attachment': 33 | attachments++ 34 | break 35 | case 'alias': 36 | aliases++ 37 | break 38 | case 'ui': 39 | ui++ 40 | break 41 | default: 42 | aux++ 43 | } 44 | }) 45 | return { files: files.length, pages, aliases, images, attachments, ui, aux, size } 46 | } 47 | 48 | function printReport (stats) { 49 | const totalImages = Object.values(stats.images).reduce((a, b) => a + b, 0) 50 | const imageDist = Object.entries(stats.images).sort((a, b) => b[1] - a[1] ) 51 | .map(([ext, cnt]) => `${Math.round((cnt / totalImages) * 10000) / 100}% ${ext.substr(1)}` ) 52 | console.log('Site Stats') 53 | console.log('----------') 54 | console.log('Files: ' + stats.files) 55 | console.log('Size: ' + toHumanReadableSize(stats.size)) 56 | console.log('Pages: ' + stats.pages) 57 | console.log('Aliases: ' + stats.aliases) 58 | console.log('Images: ' + totalImages + (totalImages > 0 ? ' (' + imageDist.join(', ') + ')' : '')) 59 | console.log('Attachments: ' + stats.attachments) 60 | console.log('UI: ' + stats.ui) 61 | console.log('Meta: ' + stats.aux) 62 | } 63 | 64 | function toHumanReadableSize (size) { 65 | const base = 1024 66 | const units = ['B', 'K', 'M', 'G', 'T'] 67 | const exp = parseInt(Math.log(size) / Math.log(base)) 68 | const ssize = size / Math.pow(base, exp) 69 | return `${Math.round(ssize * 100) / 100}${units[exp]}` 70 | } 71 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/index.adoc: -------------------------------------------------------------------------------- 1 | = Contributing to the Couchbase Documentation 2 | // Settings 3 | :hide-uri-scheme: 4 | 5 | Thank you for taking the time and effort to improve the Couchbase documentation. 6 | 7 | == Reporting Bugs and Requesting Enhancements 8 | 9 | All bugs and enhancements for the Couchbase documentation are tracked using the https://jira.issues.couchbase.com/browse/DOC[DOC project issue board^]. 10 | If you find an error, or see room for improvement on a page, please don't keep it to yourself. 11 | Even if you don't plan to make the change yourself, we would still like to know what it is! 12 | Raise a DOC bug and someone on the team will look at it. 13 | 14 | You can also raise a DOC issue by clicking the btn:[Feedback?] button in the bottom-right corner of any page on this site. 15 | 16 | === How Do I Submit a Good DOC Issue? 17 | 18 | *Use a clear and descriptive title*. 19 | For example, "`Instructions for disabling THP on RHEL/CentOS 7 and later do not work.`" 20 | 21 | *Describe the problem or enhancement in full*. 22 | For any problem, describe it in detail, including any expected results and how they differ from the real results. 23 | Remember, the documentation team are not experts in every aspect of Couchbase. 24 | For that reason, be as descriptive as possible, providing the correct text or command. 25 | This drastically reduces the time it takes to resolve the issue. 26 | https://jira.issues.couchbase.com/browse/DOC-2056[DOC-2056^] is an example of a well-written DOC bug which allowed the assigned writer to make the necessary changes quickly. 27 | 28 | == Contributing Changes 29 | 30 | If you want to contribute the changes to resolve an issue yourself, then this is greatly encouraged! 31 | 32 | You can submit simple changes, such as typo fixes and minor clarifications, using the <> workflow. 33 | For more extensive content additions and updates, or if you prefer to work locally, see the xref:workflow-overview.adoc[Contributing Workflow]. 34 | 35 | [#simple] 36 | == Simple Online Edits 37 | 38 | For simple changes, like fixing a typo or reworking a sentence, you can edit the content directly on GitHub by clicking the image:edit.svg[,16,role=icon] edit icon found on many of the documentation pages. 39 | 40 | Once you've made your edits, replace the default commit message with a short description of your change, and click btn:[Commit Changes]. 41 | Then follow the on-screen instructions to open a pull request. 42 | 43 | == Next Steps 44 | 45 | . xref:install-git-and-editor.adoc[Install Git and an AsciiDoc editor]. 46 | . xref:set-up-repository.adoc[Set up your local repository]. 47 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/add-pages.adoc: -------------------------------------------------------------------------------- 1 | = Add a New Documentation Page 2 | 3 | To add a new page to the Couchbase documentation, you need to create a new AsciiDoc file. 4 | 5 | == Create a New AsciiDoc File 6 | 7 | . Open the documentation repository that you want to work in with VS Code. 8 | + 9 | TIP: If you enabled the *Open with Code* shortcut when you xref:install-git-and-editor[installed VS Code], you can right-click inside your file explorer window from a repository to quickly open it in VS Code. 10 | . In the VS Code *Explorer* panel, navigate to the *pages* folder where you want to add a new page. 11 | + 12 | The folder structure for a documentation repository could look like the following: 13 | + 14 | ---- 15 | - 16 | -- modules 17 | --- 18 | ---- assets 19 | ---- examples 20 | ---- pages 21 | ---- partials 22 | ---- 23 | + 24 | Specifically, the folder structure for this component, the `home` component of the Couchbase docs, looks like: 25 | + 26 | ---- 27 | - home 28 | -- modules 29 | --- contribute 30 | ---- assets 31 | ---- examples 32 | ---- pages 33 | ---- partials 34 | --- ROOT 35 | ---- assets 36 | ---- pages 37 | ---- partials 38 | ---- 39 | . Right-click the *pages* folder and click *New File*. 40 | . Enter a name for your new AsciiDoc file. 41 | This filename will appear in the page's URL when it's published to our documentation site. 42 | + 43 | Make sure your filename: 44 | + 45 | ** Uses lowercase letters (a-z). 46 | ** Separates words with hyphens (`-`). 47 | ** Does not use symbols or special characters, such as `!`, `@`, `#`, or others. 48 | . End the filename with the AsciiDoc file extension, `.adoc`, and press kbd:[Enter]. 49 | + 50 | VS Code automatically opens the new file. 51 | . On the first line of the new file, enter a xref:pages.adoc#doc-title[document title], starting with an `=`. 52 | . Write your documentation using proper AsciiDoc syntax. 53 | For more information about AsciiDoc syntax, see xref:basics.adoc[] or https://docs.asciidoctor.org/asciidoc/latest/[the AsciiDoc Language documentation^]. 54 | . Save the file, or take advantage of VS Code's autosave feature (menu:File[Auto Save]). 55 | 56 | Any AsciiDoc file saved to a *pages* directory in an Antora documentation component is automatically published to the site. 57 | 58 | == Next Steps 59 | 60 | * xref:update-nav.adoc[Add a page to a component navigation menu]. 61 | * xref:test-site.adoc[Build the docs site locally to test and preview your changes]. 62 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/paypal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 18 | 28 | 29 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/extensions-template.adoc: -------------------------------------------------------------------------------- 1 | = Demo of template extension 2 | :page-role: openapi 3 | :page-toclevels: 2 4 | 5 | == Metrics example 6 | 7 | A (partial) listing of `kv-metrics.json`. 8 | Relating to https://issues.couchbase.com/browse/DOC-10720[DOC-10720] 9 | 10 | [template,example$kv-metrics.json] 11 | -- 12 | [cols="3,1,1",.json] 13 | |=== 14 | 15 | |Metric 16 | |Type 17 | |Unit 18 | 19 | {{#each this}} 20 | |`{{@key}}` 21 | 22 | {{help}} 23 | |{{type}} 24 | |{{unit}} 25 | {{/each}} 26 | 27 | |=== 28 | -- 29 | 30 | == YAML support 31 | 32 | [template,example$test.yaml] 33 | -- 34 | Try: {{foo.bar.baz}} 35 | -- 36 | 37 | == Included template 38 | 39 | [template,example$kv-metrics.json] 40 | -- 41 | include::partial$templates/test.hbs[] 42 | -- 43 | 44 | == Datafile not found 45 | 46 | The following should give an error 47 | 48 | [template,example$this-file-does-not-exist.json] 49 | -- 50 | Some template 51 | -- 52 | 53 | == Helpers and Partials 54 | 55 | === Automatically included helpers 56 | 57 | Handlebars in docs-site lib/helpers/*.js are automatically included 58 | 59 | [template, example$test.yaml] 60 | -- 61 | {{#if (eq foo.bar.baz "A successful test")}} 62 | Matched expected content 63 | {{else}} 64 | ERROR: got {{foo.bar.baz}} 65 | {{/if}} 66 | -- 67 | 68 | === Adding custom helpers by resourceId 69 | 70 | [template, example$test.yaml, helpers="example$helpers/foo.js", partials="partial$templates/partial.hbs"] 71 | -- 72 | {{foo}} 73 | 74 | {{> partial}} 75 | -- 76 | 77 | 78 | == each-openapi helper. 79 | 80 | This handlebars Block Helper is now bundled in docs-site. 81 | It should work with both YAML and JSON. 82 | 83 | It requires the OpenAPI to be output collated into a single file, for example using: 84 | 85 | [source,shell] 86 | ---- 87 | redocly bundle \ 88 | ~/couchbase/sync_gateway/docs/api/admin.yaml \ 89 | --dereferenced \ 90 | --ext json \ 91 | --output bundled-admin.json 92 | ---- 93 | 94 | Pass in a schema node, in this example `components.schemas.Database`. 95 | The macro descends into each `properties` object and generates a table of contents. 96 | 97 | In addition, we pass the contents of each node in turn to the Handlebars template contained in the `{{#each-openapi}}` block. 98 | 99 | [template,example$bundled-admin.yaml] 100 | -- 101 | 102 | {{#each-openapi components.schemas.Database}} 103 | 104 | {{#if node.description}} 105 | [#{{@path_id_href}}] 106 | === `{{@path_id}}` 107 | 108 | Type:: {{{node.type}}} 109 | 110 | Description:: 111 | + 112 | [markdown] 113 | ---- 114 | {{{node.description}}} 115 | ---- 116 | 117 | {{/if}} 118 | {{/each-openapi}} 119 | 120 | -- 121 | 122 | -------------------------------------------------------------------------------- /antora-playbook.preview.diff.yml: -------------------------------------------------------------------------------- 1 | # RUN: 2 | # scripts/patch-playbook antora-playbook.yml antora-playbook.preview.diff.yml > antora-playbook.preview.yml 3 | 4 | antora: 5 | extensions: 6 | - ./lib/preview.js 7 | - ./lib/report-tree.js 8 | # - ./lib/site-stats-extension.js 9 | # - ./lib/component-stats.js 10 | 11 | site: 12 | title: Couchbase Docs Preview 13 | robots: disallow 14 | keys: 15 | nav_groups: | 16 | [ 17 | { "title": "Server", "startPage": "home::server.adoc", "components": ["server", "enterprise-analytics"] }, 18 | { "title": "Mobile / Edge", "startPage": "home::mobile.adoc", "components": ["couchbase-lite", "couchbase-lite-javascript", "sync-gateway", "couchbase-edge-server"] }, 19 | { "title": "Capella", "startPage": "home::cloud.adoc", "components": ["cloud", "analytics", "ai"] }, 20 | { "title": "Cloud-Native", "components": ["cloud-native-database"] }, 21 | { "title": "Kubernetes Operator", "startPage": "operator::overview.adoc", "components": ["operator"] }, 22 | { "title": "CMOS", "components": ["cmos"] }, 23 | { "title": "Develop", "startPage": "home::developer.adoc", 24 | "subGroups": [ 25 | { 26 | "title": "Operational SDKs", 27 | "startPage": "home::sdk.adoc", 28 | "components": ["develop", "dotnet-sdk", "efcore-provider", "c-sdk", "cxx-sdk", "go-sdk", "java-sdk", "quarkus-extension", "kotlin-sdk", "nodejs-sdk", "php-sdk", "python-sdk", "ruby-sdk", "rust-sdk", "scala-sdk", "elasticsearch-connector", "kafka-connector", "spark-connector", "tableau-connector", "power-bi-connector", "superset-connector", "sdk-extensions"] 29 | }, 30 | { 31 | "title": "Analytics SDKs", 32 | "startPage": "home::analytics-sdk.adoc", 33 | "components": ["*-analytics-sdk", "*-columnar-sdk"] 34 | } 35 | ] 36 | }, 37 | { "title": "Tutorials", "startPage": "tutorials::index.adoc", "components": ["tutorials"] }, 38 | { "title": "Contribute", "components": ["home", "styleguide", "ui-ux", "pendo"] } 39 | ] 40 | 41 | content: 42 | sources: 43 | - url: https://github.com/couchbaselabs/docs-ai 44 | branches: [main] 45 | 46 | asciidoc: 47 | attributes: 48 | kroki-server-url: null 49 | page-show-preview-banner: true 50 | page-watermark: preview@ 51 | # page-chatbot-origin: https://dfddckwnvn0ml.cloudfront.net # Production, via Elliot 52 | page-chatbot-origin: https://d2tkqbbgxczr0v.cloudfront.net # Staging, via Elliot 53 | 54 | ui: 55 | bundle: 56 | url: https://github.com/couchbase/docs-ui/releases/download/prod-217/ui-bundle.zip 57 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/amadeus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | white logoAmadeus Full Color 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /antora-playbook-staging.diff.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - ./lib/report-tree.js 4 | 5 | site: 6 | title: Couchbase Docs Staging 7 | url: https://docs-staging.couchbase.com 8 | start_page: home::index.adoc 9 | robots: | 10 | User-agent: * 11 | Disallow: / 12 | 13 | User-agent: Algolia Crawler 14 | Allow: / 15 | keys: 16 | google_analytics: ~ 17 | 18 | content: 19 | 20 | $select: 21 | - '.' 22 | - '**' # everything 23 | # see https://github.com/micromatch/picomatch for full details 24 | # e.g. 25 | # - '**/*sdk*' # add all repos matching *sdk* 26 | 27 | # start off with first 3 branches 28 | $prune: 3 29 | 30 | sources: 31 | - url: https://github.com/couchbaselabs/cb-swagger 32 | branches: [capella] # ensure added as well as most recent release/* branches 33 | 34 | - url: https://github.com/couchbaselabs/docs-devex 35 | branches: [capella] # ensure added as well as most recent release/* branches 36 | 37 | - url: https://github.com/couchbase/docs-operator 38 | branches: [release/2.8.1] 39 | # release/2.8.1 is set to version `2.9` so should not clash with release/2.8 40 | 41 | - url: https://github.com/couchbaselabs/cbmultimanager 42 | branches: 43 | $replace: [master] 44 | 45 | - url: https://github.com/couchbase/docs-sdk-common 46 | # not $replace, as we can just merge 47 | branches: 48 | - release/8.0 49 | - release/7.7 50 | - release/7.6.6 51 | - release/7.6.2 52 | - release/7.6 53 | - release/7.2 54 | 55 | - url: https://github.com/couchbaselabs/docs-couchbase-lite 56 | branches: [release/3.3] 57 | 58 | - url: https://github.com/couchbase/docs-sdk-cxx 59 | branches: 60 | - release/1.2 61 | 62 | - url: https://github.com/couchbase/docs-sdk-dotnet 63 | branches: 64 | - temp/3.9 65 | 66 | - url: https://github.com/couchbase/docs-sdk-nodejs 67 | branches: 68 | - temp/4.6 69 | 70 | - url: https://github.com/couchbase/docs-sdk-php 71 | branches: 72 | - temp/4.4 73 | 74 | - url: https://github.com/couchbase/docs-sdk-python 75 | branches: 76 | - release/4.5 77 | 78 | - url: https://github.com/couchbase/docs-sdk-ruby 79 | branches: 80 | - temp/3.7 81 | 82 | - url: https://github.com/couchbase/docs-sdk-kotlin 83 | branches: 84 | # 'release/3.9' instead of 'temp/3.9' 85 | $replace: [release/3.9, temp/1.5, temp/1.4, temp/1.3, release/1.2] 86 | 87 | # ui: 88 | # bundle: 89 | # url: https://github.com/couchbase/docs-ui/releases/download/prod-216/ui-bundle.zip 90 | 91 | asciidoc: 92 | attributes: 93 | # page-chatbot-origin: https://dfddckwnvn0ml.cloudfront.net # Production, via Elliot 94 | page-chatbot-origin: https://d2tkqbbgxczr0v.cloudfront.net # Staging, via Elliot 95 | -------------------------------------------------------------------------------- /lib/report-tree.hbs: -------------------------------------------------------------------------------- 1 | 77 | 78 |

            What's Up, Doc? 🐇

            79 |

            Generated at {{date}}

            80 | 81 |

            Featured Pages

            82 | 91 | 92 | {{#with pr}} 93 |

            GitHub PR #{{number}}: {{title}} 94 | by {{author.name}} ({{state}} {{updatedAt}})

            95 |
            96 | {{{body}}} 97 |
            98 | {{/with}} 99 | 100 |

            Detailed Report

            101 | From this antora playbook. 102 | 103 |
              104 | {{#each tree.$children}} 105 | {{> tree}} 106 | {{/each}} 107 |
            108 | 109 | 110 | 120 | -------------------------------------------------------------------------------- /scripts/patch-cutdown-playbook: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict' 4 | 5 | const path = require('node:path') 6 | const yaml = require('yaml') 7 | const fs = require('node:fs') 8 | const deepmerge = require('@fastify/deepmerge') 9 | const picomatch = require('picomatch') 10 | 11 | function readYaml (path) { 12 | if (fs.existsSync(path)) { 13 | return yaml.parse(fs.readFileSync(path).toString()) 14 | } 15 | else { 16 | throw new Error(`Could not find ${path}`) 17 | } 18 | } 19 | 20 | const [_,script, BASE] = process.argv 21 | if (! BASE) { 22 | throw new Error(`Pass in the basename of the playbook to create, like 'antora-playbook-staging'`) 23 | } 24 | 25 | 26 | let {content: {sources, ...content}, ...playbook} = readYaml('antora-playbook.yml') 27 | const {content: {$select, $prune, sources: ds, ...dc}, ...diff} = readYaml(`${BASE}.diff.yml`) 28 | 29 | 30 | function mergeArray(target, source) { 31 | if (typeof target != 'object') { target = [target] } 32 | if (typeof source != 'object') { source = [source] } 33 | 34 | return Array.from(new Set([...target, ...source])) 35 | } 36 | const mergeArrayPrepend = (target, source) => mergeArray(source, target) 37 | 38 | let preview = deepmerge({mergeArray: (_) => mergeArray, all: true})( 39 | playbook, 40 | {content}, 41 | diff, 42 | {content: dc}) 43 | 44 | if ($select) { 45 | const f = picomatch($select) 46 | sources = sources.filter((s) => { 47 | return f(s.url)}) 48 | } 49 | 50 | let sn = Object.groupBy(ds, (s) => s.url) 51 | 52 | sources = sources.map(({url, ...s}) => { 53 | if (typeof s.branches != 'object') { s.branches = [s.branches || 'master'] } 54 | if ($prune) { 55 | s.branches = s.branches.slice(0,$prune) 56 | } 57 | 58 | let s2 = sn[url] 59 | if (s2) { 60 | console.log(url, sn[url]) 61 | delete sn[url] 62 | ;[s2] = s2 63 | s = deepmerge({mergeArray: (_) => mergeArrayPrepend})(s, s2) 64 | 65 | /* 66 | * if branches: [...] then it'll get merged 67 | * BUT... if we defined $replace then we'll clobber with the object instead */ 68 | s.branches = s.branches.$replace || s.branches 69 | } 70 | 71 | return {url, ...s} 72 | }) 73 | 74 | for (const s of Object.values(sn).flat()) { 75 | if ('$prepend' in s) { 76 | delete s.$prepend 77 | sources.unshift(s) 78 | } 79 | else { 80 | sources.push(s) 81 | } 82 | } 83 | 84 | preview.content.sources = sources 85 | 86 | const header = `\###### 87 | # WARNING: DO NOT EDIT BY HAND 88 | # (it will get overwritten) 89 | # 90 | # Instead 91 | # 92 | # * edit ${BASE}.diff.yml with just the *differences* from the main playbook 93 | # * run: ${script} ${BASE} \n\n` 94 | 95 | fs.writeFileSync( 96 | `${BASE}.yml`, 97 | header + yaml.stringify(preview), 98 | { encoding: 'utf8' }) 99 | 100 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/nav-menus-and-files.adoc: -------------------------------------------------------------------------------- 1 | :page-status: OUT OF DATE 2 | 3 | = Navigation Menus and Files 4 | :url-git-ui: https://github.com/couchbase/docs-ui 5 | 6 | NOTE: {out-of-date} 7 | 8 | == Component Selector Menu 9 | 10 | The products and services listed in the custom component selector dropdown menu are provided by the _header-content.hbs_ template in the site's {url-git-ui}[UI project]. 11 | 12 | == Component Version Selector Menu 13 | 14 | The component name and version numbers listed in the version selector menu are generated from the xref:component-configuration.adoc#config[title and version keys] in the _antora.yml_ file corresponding to that component version. 15 | 16 | == Component Menu 17 | 18 | A component menu is the navigation displayed on the left side of the page when a visitor enters the documentation for a component. 19 | This menu is created from the <> registered in that component's _antora.yml_ file. 20 | The order the files are registered is the order their contents are displayed in the menu. 21 | 22 | === Breadcrumbs 23 | 24 | The breadcrumbs listed at the top of a page are computed from the parent entry link text in the navigation file. 25 | 26 | == On This Page Sidebar 27 | 28 | A page's xref:pages.adoc#document-sections[heading 2 section titles] are displayed in the *On This Page* sidebar located on the right side of the page. 29 | 30 | [#nav-file] 31 | == Navigation Files 32 | 33 | When you want visitors to locate a page using the <>, you must add a cross reference (`xref`) to that page in the appropriate navigation file. 34 | A navigation file can also include links to external URLs and other content, such as icons and normal text. 35 | 36 | === Requirements, Best Practices, and Styles 37 | 38 | * A module can have no navigation file, one navigation file, or many navigation files. 39 | * If a module does have one or more navigation files, store the file(s) at the base of the module, e.g., _modules/ROOT/nav.adoc_, _modules/contribute/nav.adoc_. 40 | * In order to be published in a component menu, a navigation file must be registered in a component descriptor (_antora.yml_). 41 | * A navigation file must use the AsciiDoc file extension and is typically named `nav.adoc`. 42 | * A navigation file must contain at least one unordered AsciiDoc list. 43 | * The Couchbase documentation starts each list with a category title. 44 | See xref:update-nav.adoc[Update a Navigation File] to learn how to create category titles and list items. 45 | ** Use title case for category titles. 46 | Write "`and`" as an ampersand (*&*). 47 | * Use the cross reference macro (`xref`) to link to documentation pages. 48 | See xref:update-nav.adoc#xrefs[Xrefs] for navigation xref and link text examples. 49 | ** Use title case for the link text in list items. 50 | Write "`and`" as *and*. 51 | 52 | //TIP: All of the AsciiDoc files in a _pages_ directory are automatically published to your site by Antora. 53 | 54 | == Learn More 55 | 56 | xref:update-nav.adoc[Update a navigation file]. 57 | -------------------------------------------------------------------------------- /slim-playbook.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - '@antora/site-generator-ms' 4 | 5 | site: 6 | title: Couchbase Docs 7 | url: https://docs123.couchbase.com 8 | start_page: home::index.adoc 9 | robots: allow 10 | keys: 11 | google_analytics: GTM-MVPNN2 12 | nav_groups: | 13 | [ 14 | { "title": "Server", "startPage": "home::server.adoc", "components": ["server"] }, 15 | { "title": "Mobile", "startPage": "home::mobile.adoc", "components": ["couchbase-lite", "sync-gateway"] }, 16 | { "title": "Cloud", "startPage": "cloud::index.adoc", "components": ["cloud"] }, 17 | { "title": "Cloud-Native", "startPage": "cloud-native-database::index.adoc", "components": ["cloud-native-database"] }, 18 | { "title": "Autonomous Operator", "components": ["operator"] }, 19 | { "title": "Service Broker", "components": ["service-broker"] }, 20 | { "title": "SDKs", "startPage": "home::sdk.adoc", "components": ["*-sdk", "cxx-txns", "elasticsearch-connector", "kafka-connector", "spark-connector"] }, 21 | { "title": "Tutorials", "startPage": "tutorials::index.adoc", "components": ["tutorials"] } 22 | ] 23 | git: 24 | ensure_git_suffix: false 25 | urls: 26 | latest_version_segment_strategy: redirect:to 27 | latest_version_segment: current 28 | content: 29 | branches: release/* 30 | sources: 31 | - url: . 32 | branches: HEAD 33 | start_path: home 34 | # - url: https://github.com/couchbase/couchbase-cli.git 35 | # branches: [master] 36 | # start_path: docs 37 | # - url: ../docs-sdk-python/ 38 | # branches: [HEAD] 39 | # - url: ../docs-sdk-dotnet/ 40 | # branches: [HEAD] 41 | # - url: ../docs-sdk-java/ 42 | # branches: [HEAD] 43 | # - url: ../docs-server/ 44 | # branches: [HEAD] 45 | - url: https://github.com/couchbase/docs-sdk-python 46 | branches: [release/4.1, release/4.0] 47 | - url: https://github.com/couchbase/docs-sdk-dotnet 48 | branches: [release/3.4, release/3.3] 49 | - url: https://github.com/couchbase/docs-sdk-ruby 50 | branches: [release/3.4, release/3.3] 51 | asciidoc: 52 | attributes: 53 | max-include-depth: 10 54 | page-partial: false 55 | experimental: '' 56 | idprefix: '@' 57 | idseparator: '-@' 58 | sqlpp: SQL++ 59 | tabs: tabs 60 | toc: ~ 61 | page-toclevels: 1@ 62 | xrefstyle: short 63 | enterprise: https://www.couchbase.com/products/editions[ENTERPRISE EDITION] 64 | community: https://www.couchbase.com/products/editions[COMMUNITY EDITION] 65 | kroki-fetch-diagram: true 66 | kroki-server-url: http://3.91.133.254:9500 67 | extensions: 68 | - ./lib/source-url-include-processor.js 69 | - ./lib/json-config-ui-block-macro.js 70 | - ./lib/inline-man-macro.js 71 | - ./lib/multirow-table-head-tree-processor.js 72 | - ./lib/swagger-ui-block-macro.js 73 | - ./lib/tabs-block.js 74 | - ./lib/markdown-block.js 75 | - ./lib/inline-jira-macro.js 76 | - asciidoctor-kroki 77 | ui: 78 | bundle: 79 | url: https://github.com/couchbase/docs-ui/releases/download/prod-166/ui-bundle.zip 80 | output: 81 | dir: ./public 82 | -------------------------------------------------------------------------------- /home/modules/ROOT/pages/columnar-sdk.adoc: -------------------------------------------------------------------------------- 1 | = Develop with Capella Analytics 2 | :page-layout: landing-page-top-level-sdk 3 | :page-role: tiles 4 | :page-rank: 75 5 | :!sectids: 6 | 7 | = Develop with Capella Analytics 8 | 9 | include::partial$info-banner.adoc[] 10 | 11 | xref:analytics:intro:intro.adoc[Capella Analytics] is a real-time analytical database (RT-OLAP) for real time apps and operational intelligence. 12 | Capella Analytics is a standalone, managed offering from Couchbase under the Capella family of products -- 13 | a self-managed xref:enterprise-analytics:intro:intro.adoc[Enterprise Analytics] product is also available. 14 | 15 | [TIP] 16 | .Which Analytics Service? 17 | ==== 18 | Capella Analytics and Enterprise Analytics are column-based real-time analytical databases. 19 | 20 | Capella Analytics SDKs, also known as Columnar SDKs, are similar to the Enterprise Analytics SDKs. 21 | They must be used to connect to the current Capella Analytics Service, as it presents a different connection interface, without Enterprise Analytics' load balancer. 22 | 23 | To connect to self-managed Enterprise Analytics, use our xref:analytics-sdk.adoc[Enterprise Analytics SDKs]. 24 | 25 | xref:server:learn:services-and-indexes/services/analytics-service.adoc[CBAS (Couchbase Analytics Service)] is our classic OLAP available as part of self-managed Couchbase Server and Capella Operational. 26 | Use the xref:sdk.adoc[operational SDKs] to develop for this service. 27 | ==== 28 | 29 | 30 | == SDK APIs to work with Capella Analytics: 31 | 32 | Columnar SDKs are developed from the ground-up and while they maintain some syntactic similarities with the xref:sdk.adoc[operational SDKs], 33 | they are purpose built for Capella Analytics's real-time analytical use cases. 34 | They support streaming APIs to handle large datasets, as well as the common features expected to be present in any modern database SDK -- 35 | such as connection management and robust error handling. 36 | 37 | 38 | [{tabs}] 39 | ==== 40 | Go:: 41 | + 42 | -- 43 | xref:go-columnar-sdk:hello-world:overview.adoc[Go Columnar SDK Docs] | 44 | xref:go-columnar-sdk:hello-world:start-using-sdk.adoc[Quickstart] | 45 | https://pkg.go.dev/github.com/couchbase/gocbcolumnar[Go API Reference] 46 | -- 47 | 48 | Java:: 49 | + 50 | -- 51 | xref:java-columnar-sdk:hello-world:overview.adoc[Java Columnar SDK Docs] | 52 | xref:java-columnar-sdk:hello-world:start-using-sdk.adoc[Quickstart] | 53 | https://docs.couchbase.com/sdk-api/couchbase-columnar-java-client[Java API Reference] 54 | -- 55 | 56 | Node.js:: 57 | + 58 | -- 59 | xref:nodejs-columnar-sdk:hello-world:overview.adoc[Node.js Columnar SDK Docs] | 60 | xref:nodejs-columnar-sdk:hello-world:start-using-sdk.adoc[Quickstart] | 61 | https://docs.couchbase.com/sdk-api/columnar-nodejs-client[Node.js API Reference] 62 | -- 63 | 64 | Python:: 65 | + 66 | -- 67 | xref:python-columnar-sdk:hello-world:overview.adoc[Python Columnar SDK Docs] | 68 | xref:python-columnar-sdk:hello-world:start-using-sdk.adoc[Quickstart] | 69 | https://docs.couchbase.com/sdk-api/columnar-python-client[Python API Reference] 70 | -- 71 | ==== 72 | 73 | 74 | -------------------------------------------------------------------------------- /antora-playbook-staging-chatbot.diff.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - ./lib/report-tree.js 4 | # - ./lib/site-stats-extension.js 5 | 6 | site: 7 | title: Couchbase Docs Staging Chatbot 8 | url: https://chatbot-staging.docs-test.couchbase.com 9 | start_page: home::index.adoc 10 | robots: disallow 11 | keys: 12 | google_analytics: ~ 13 | 14 | content: 15 | 16 | $select: 17 | - '.' 18 | - '**' # everything 19 | # see https://github.com/micromatch/picomatch for full details 20 | # e.g. 21 | # - '**/*sdk*' # add all repos matching *sdk* 22 | 23 | # start off with first 3 branches 24 | $prune: 3 25 | 26 | sources: 27 | - url: . 28 | branches: AV-87603_update-capella-landing-for-AI 29 | 30 | - url: https://github.com/couchbaselabs/cb-swagger 31 | branches: [capella] # ensure added as well as most recent release/* branches 32 | 33 | - url: https://github.com/couchbaselabs/docs-devex 34 | branches: 35 | - capella # keep this here 36 | 37 | - url: https://github.com/couchbasecloud/couchbase-cloud 38 | branches: [8-0-docs-uptake] 39 | start_paths: [docs/public, docs/columnar] 40 | 41 | - url: https://github.com/couchbase/docs-analytics 42 | branches: 43 | - release/8.0 44 | 45 | - url: https://github.com/couchbase/docs-operator 46 | branches: 47 | - release/2.8.1 # is set to version `2.9` so will coexist with release/2.8 48 | 49 | - url: https://github.com/couchbaselabs/cbmultimanager 50 | branches: 51 | $replace: [master] 52 | 53 | - url: https://github.com/couchbase/docs-server 54 | branches: 55 | - release/8.0 56 | 57 | - url: https://github.com/couchbase/docs-sdk-common 58 | # not $replace, as we can just merge 59 | branches: 60 | - release/8.0 61 | - release/7.7 62 | - release/7.6.6 63 | - release/7.6.2 64 | - release/7.6 65 | - release/7.2 66 | 67 | - url: https://github.com/couchbaselabs/docs-couchbase-lite 68 | branches: [release/3.3] 69 | 70 | - url: https://github.com/couchbase/docs-sdk-cxx 71 | branches: 72 | - release/1.2 73 | 74 | - url: https://github.com/couchbase/docs-sdk-nodejs 75 | branches: 76 | - temp/4.6 77 | 78 | - url: https://github.com/couchbase/docs-sdk-php 79 | branches: 80 | - temp/4.4 81 | 82 | - url: https://github.com/couchbase/docs-sdk-python 83 | branches: 84 | - temp/4.5 85 | 86 | - url: https://github.com/couchbase/docs-sdk-ruby 87 | branches: 88 | - temp/3.7 89 | 90 | - url: https://github.com/couchbase/docs-sdk-kotlin 91 | branches: 92 | # 'release/3.9' instead of 'temp/3.9' 93 | $replace: [release/3.9, temp/1.5, temp/1.4, temp/1.3, release/1.2] 94 | 95 | # ui: 96 | # bundle: 97 | # url: https://github.com/couchbase/docs-ui/releases/download/prod-216/ui-bundle.zip 98 | 99 | asciidoc: 100 | attributes: 101 | # page-chatbot-origin: https://dfddckwnvn0ml.cloudfront.net # Production, via Elliot 102 | page-chatbot-origin: https://d2tkqbbgxczr0v.cloudfront.net # Staging, via Elliot 103 | -------------------------------------------------------------------------------- /test-styleguide.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - "@antora/site-generator-ms" 4 | site: 5 | title: Couchbase Docs 6 | url: https://docs.couchbase.com 7 | start_page: home::index.adoc 8 | robots: allow 9 | keys: 10 | google_analytics: GTM-MVPNN2 11 | nav_groups: > 12 | [ 13 | { "title": "Server", "startPage": "home::server.adoc", "components": ["server"] }, 14 | { "title": "Mobile", "startPage": "home::mobile.adoc", "components": ["couchbase-lite", "sync-gateway"] }, 15 | { "title": "Capella", "startPage": "cloud::index.adoc", "components": ["cloud"] }, 16 | { "title": "Cloud-Native", "startPage": "cloud-native-database::index.adoc", "components": ["cloud-native-database"] }, 17 | { "title": "Autonomous Operator", "components": ["operator"] }, 18 | { "title": "CMOS", "components": ["cmos"] }, 19 | { "title": "Service Broker", "components": ["service-broker"] }, 20 | { "title": "SDKs", "startPage": "home::sdk.adoc", "components": ["*-sdk", "cxx-txns", "elasticsearch-connector", "kafka-connector", "spark-connector", "tableau-connector", "sdk-extensions"] }, 21 | { "title": "Contribute", "components": ["home", "styleguide", "ui-ux", "pendo"] } 22 | ] 23 | git: 24 | ensure_git_suffix: false 25 | fetch_concurrency: 10 26 | urls: 27 | latest_version_segment_strategy: redirect:to 28 | latest_version_segment: current 29 | content: 30 | branches: master 31 | sources: 32 | - url: . 33 | branches: HEAD 34 | start_path: home 35 | - url: https://github.com/couchbaselabs/docs-style-guide 36 | branches: main 37 | start_paths: [styleguide, ui-ux, pendo] 38 | asciidoc: 39 | attributes: 40 | site-navigation-data-path: _/js/site-navigation-data.js 41 | enable-cmos: "" 42 | max-include-depth: 10 43 | page-partial: false 44 | experimental: "" 45 | idprefix: "@" 46 | idseparator: -@ 47 | tabs: tabs 48 | toc: null 49 | page-toclevels: 1@ 50 | xrefstyle: short 51 | enterprise: https://www.couchbase.com/products/editions[ENTERPRISE EDITION] 52 | community: https://www.couchbase.com/products/editions[COMMUNITY EDITION] 53 | sqlpp: SQL++ 54 | sqlpp_url: https://www.couchbase.com/products/n1ql 55 | cbpp: Couchbase++ 56 | kroki-server-url: null 57 | kroki-fetch-diagram: false 58 | url-issues: https://issues.couchbase.com/browse 59 | url-issues-jscbc: https://issues.couchbase.com/browse 60 | url-issues-av: https://couchbasecloud.atlassian.net/browse 61 | page-jira-component-id: 17512 # for-hakim 62 | page-dev-slug: "hakim rest-playbook.yml Tue 25 Jul 2023 10:51:11 BST" 63 | page-dev-url: https://github.com/couchbase/docs-infra/actions 64 | extensions: 65 | - ./lib/source-url-include-processor.js 66 | - ./lib/json-config-ui-block-macro.js 67 | - ./lib/inline-man-macro.js 68 | - ./lib/multirow-table-head-tree-processor.js 69 | - ./lib/swagger-ui-block-macro.js 70 | - ./lib/tabs-block.js 71 | - ./lib/markdown-block.js 72 | - ./lib/template-block.js 73 | - asciidoctor-kroki 74 | - asciidoctor-external-callout 75 | ui: 76 | bundle: 77 | url: https://github.com/couchbase/docs-ui/releases/download/prod-179/ui-bundle.zip 78 | output: 79 | dir: ./public 80 | 81 | -------------------------------------------------------------------------------- /lib/swagger-ui-block-macro.js: -------------------------------------------------------------------------------- 1 | const buildSwaggerUi = ({ specUrl, bundleUrl }) => ` 2 | 3 | 4 | ` 55 | 56 | function blockSwaggerUiMacro ({ file }) { 57 | return function () { 58 | this.process((parent, specUrl, attrs) => { 59 | const doc = parent.getDocument() 60 | if (~specUrl.indexOf('{')) { 61 | specUrl = doc.$sub_attributes(specUrl, Opal.hash({ attribute_missing: 'drop-line' })) 62 | if (!specUrl) return 63 | } 64 | const bundleUrl = specUrl.startsWith('https://s3.amazonaws.com/cb-docs-swagger/') 65 | ? 'https://cb-docs-swagger.s3.amazonaws.com/dist3' 66 | : 'https://couchbase-docs.s3.amazonaws.com/assets/swagger-ui-3.7' 67 | const contentScripts = buildSwaggerUi({ specUrl, bundleUrl }) 68 | file.asciidoc.attributes['page-content-scripts'] = contentScripts 69 | return this.createBlock(parent, 'pass', '
            ') 70 | }) 71 | } 72 | } 73 | 74 | function register (registry, context) { 75 | registry.blockMacro('swagger_ui', blockSwaggerUiMacro(context)) 76 | } 77 | 78 | module.exports.register = register 79 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/cisco.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logoCisco Full Color 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/comcast.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | white logocomcast 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/tesco.svg: -------------------------------------------------------------------------------- 1 | Tesco white -------------------------------------------------------------------------------- /test-remote.yml: -------------------------------------------------------------------------------- 1 | antora: 2 | extensions: 3 | - "@antora/site-generator-ms" 4 | site: 5 | title: Couchbase Docs 6 | url: https://docs.couchbase.com 7 | start_page: home::index.adoc 8 | robots: allow 9 | keys: 10 | google_analytics: GTM-MVPNN2 11 | nav_groups: > 12 | [ 13 | { "title": "Server", "startPage": "home::server.adoc", "components": ["server"] }, 14 | { "title": "Mobile", "startPage": "home::mobile.adoc", "components": ["couchbase-lite", "sync-gateway"] }, 15 | { "title": "Capella", "startPage": "cloud::index.adoc", "components": ["cloud"] }, 16 | { "title": "Cloud-Native", "startPage": "cloud-native-database::index.adoc", "components": ["cloud-native-database"] }, 17 | { "title": "Autonomous Operator", "components": ["operator"] }, 18 | { "title": "CMOS", "components": ["cmos"] }, 19 | { "title": "Service Broker", "components": ["service-broker"] }, 20 | { "title": "SDKs", "startPage": "home::sdk.adoc", "components": ["*-sdk", "cxx-txns", "elasticsearch-connector", "kafka-connector", "spark-connector", "tableau-connector", "sdk-extensions"] }, 21 | { "title": "Tutorials", "startPage": "tutorials::index.adoc", "components": ["tutorials"] } 22 | ] 23 | git: 24 | ensure_git_suffix: false 25 | fetch_concurrency: 10 26 | urls: 27 | latest_version_segment_strategy: redirect:to 28 | latest_version_segment: current 29 | content: 30 | branches: master 31 | sources: 32 | - url: https://github.com/couchbase/docs-site/ 33 | branches: 34 | - template-helpers 35 | start_path: home 36 | tags: ALL 37 | local: true 38 | - url: https://github.com/malarky/docs-server 39 | branches: 40 | - DOC-10720-7.2 41 | asciidoc: 42 | attributes: 43 | site-navigation-data-path: _/js/site-navigation-data.js 44 | enable-cmos: "" 45 | max-include-depth: 10 46 | page-partial: false 47 | experimental: "" 48 | idprefix: "@" 49 | idseparator: -@ 50 | tabs: tabs 51 | toc: null 52 | page-toclevels: 1@ 53 | xrefstyle: short 54 | enterprise: https://www.couchbase.com/products/editions[ENTERPRISE EDITION] 55 | community: https://www.couchbase.com/products/editions[COMMUNITY EDITION] 56 | sqlpp: SQL++ 57 | sqlpp_url: https://www.couchbase.com/products/n1ql 58 | cbpp: Couchbase++ 59 | kroki-server-url: null 60 | kroki-fetch-diagram: false 61 | url-issues: https://issues.couchbase.com/browse 62 | url-issues-jscbc: https://issues.couchbase.com/browse 63 | url-issues-av: https://couchbasecloud.atlassian.net/browse 64 | page-jira-component-id: 17512 # for-hakim 65 | page-dev-slug: "hakim rest-playbook.yml Tue 25 Jul 2023 10:51:11 BST" 66 | page-dev-url: https://github.com/couchbase/docs-infra/actions 67 | extensions: 68 | - ./lib/source-url-include-processor.js 69 | - ./lib/json-config-ui-block-macro.js 70 | - ./lib/inline-jira-macro.js 71 | - ./lib/inline-man-macro.js 72 | - ./lib/multirow-table-head-tree-processor.js 73 | - ./lib/swagger-ui-block-macro.js 74 | - ./lib/tabs-block.js 75 | - ./lib/markdown-block.js 76 | - ./lib/template-block.js 77 | - asciidoctor-kroki 78 | - asciidoctor-external-callout 79 | ui: 80 | bundle: 81 | url: https://github.com/couchbase/docs-ui/releases/download/sandbox-17/ui-bundle.zip 82 | output: 83 | dir: ./public 84 | 85 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/tables.adoc: -------------------------------------------------------------------------------- 1 | // tag::two-col[] 2 | .CLI parameters for adding a node 3 | [cols="1,2"] 4 | |=== 5 | |Parameter |Description 6 | 7 | |`--cluster` 8 | |The IP address of a node in the existing cluster. 9 | 10 | |`--user` 11 | |The username for the existing cluster. 12 | 13 | |`--password` 14 | |The password for the existing cluster. 15 | |=== 16 | // end::two-col[] 17 | 18 | // tag::adoc[] 19 | .cbq Shell Commands 20 | [#table-cbq-shell-commands,cols="1,2,4"] 21 | |=== 22 | |Shell Command |Arguments |Description and Examples 23 | 24 | |`\SET` 25 | |`parameter=prefix:variable name` 26 | a| 27 | Sets the top most value of the stack for the given variable with the specified value. 28 | 29 | Variables can be of the following types: 30 | 31 | [#set-var-types] 32 | * Query parameters 33 | * Session variables 34 | * User-defined 35 | * Pre-defined and named parameters. 36 | 37 | |`\PUSH` 38 | |`parameter value` 39 | a| 40 | Pushes the specified value on to the given parameter stack. 41 | 42 | ---- 43 | cbq> \PUSH -args [8]; 44 | ---- 45 | 46 | .Resulting variable stack 47 | ---- 48 | cbq> \SET; 49 | Query Parameters : 50 | Parameter name : args 51 | Value : [[6,7] [8] [8]] 52 | ... 53 | cbq> 54 | ---- 55 | |=== 56 | // end::adoc[] 57 | 58 | // tag::spans[] 59 | |=== 60 | 61 | |Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 3, row 1 62 | 63 | 3+|Content in a single cell that spans columns 1, 2, and 3 64 | 65 | |Cell in column 1, row 3 66 | |Cell in column 2, row 3 67 | |Cell in column 3, row 3 68 | 69 | .2+|Content in a single cell that spans rows 4 and 5 70 | |Cell in column 2, row 4 71 | |Cell in column 3, row 4 72 | 73 | |Cell in column 2, row 5 74 | |Cell in column 3, row 5 75 | |=== 76 | // end::spans[] 77 | 78 | .Server Details 79 | [cols="3,8"] 80 | |=== 81 | |Field |Description 82 | 83 | |name / group 84 | |The server IP address and the group name this server belongs to. 85 | 86 | |services 87 | |The running services on this server. 88 | The options are data, full text, index, and query. 89 | 90 | |Statistics 91 | |Click the menu:[Statistics] link to view stats details on this server. 92 | For more information, see xref:server:monitoring:ui-monitoring-statistics.adoc#topic16695[Monitoring Statistics]. 93 | |=== 94 | 95 | [cols="64,50,139"] 96 | |=== 97 | |Limit |Default Value |Description 98 | 99 | |Max view key size 100 | |4096 bytes 101 | |The maximum size of the key (first attribute) in the `emit()` function. 102 | 103 | |Max doc size for indexing 104 | |20 MB 105 | |The maximum size of a document that can be indexed. 106 | The default value is set to 20 MB to ensure that all documents get indexed. 107 | 108 | In Couchbase Server version 2.x and earlier, the view engine enforced a limit of 1MB on documents that can be indexed. 109 | As a result, when the size of a document exceeded the limit, the view engine (in version 2.x) did not index that document. 110 | 111 | |Function timeout 112 | |1000 ms 113 | |The maximum duration (in milliseconds) to execute all the MapReduce functions in a design document against a single document (map function) or against a list of map values or reductions (reduce or rereduce function). 114 | If the execution time for a document exceeds the specified value, the execution is aborted and that document is not indexed. 115 | |=== 116 | -------------------------------------------------------------------------------- /lib/source-url-include-processor.js: -------------------------------------------------------------------------------- 1 | const resolveIncludeFile = (() => { 2 | try { 3 | return require('@antora/asciidoc-loader/include/resolve-include-file') 4 | } catch (e) { 5 | return require(require.resolve('@antora/asciidoc-loader/include/resolve-include-file', { paths: module.parent.paths })) 6 | } 7 | })() 8 | 9 | const NEWLINE_RX = /\r\n?|\n/ 10 | const TAG_DIRECTIVE_RX = /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m 11 | const INDENT_RX = /^ */m 12 | 13 | function initSourceUrlIncludeProcessor ({ file, contentCatalog }) { 14 | return function () { 15 | this.$option('position', '>>') 16 | this.process((doc, reader, target, attrs) => { 17 | let remainingLines 18 | const includeStackSize = reader.include_stack.length 19 | const embedSourceUrl = !target.endsWith('.adoc') && ((remainingLines = reader.getLines())[0] === '----' || 20 | (remainingLines[0] === '...' && remainingLines[1] === '----')) 21 | const defaultProcessor = doc.getExtensions().$include_processors().find((it) => it.instance !== this) 22 | defaultProcessor.process_method['$[]'](doc, reader, target, Opal.hash(attrs)) 23 | const includeFile = embedSourceUrl && resolveIncludeFile(target, file, reader.$cursor_at_prev_line(), contentCatalog) 24 | if (!includeFile || reader.include_stack.length === includeStackSize) return 25 | const includeFileSrc = includeFile.src || includeFile.context 26 | const includeContents = includeFile.contents 27 | let sourceUrl = (includeFileSrc.fileUri || includeFileSrc.editUrl.replace(`/edit/${includeFileSrc.origin.branch}`, `/blob/${includeFileSrc.origin.refhash}`)) + resolveLineRangeFragment(includeContents, attrs) 28 | reader.pushInclude(`${computeIndent(reader.lines)}[data-source-url=${sourceUrl}]\n`, target, target, 1, attrs) 29 | // NOTE: this assignment works since the attribute is only used internally by this extension 30 | Opal.hash_put(doc.header_attributes, 'promote-data-source-url', '') 31 | }) 32 | } 33 | } 34 | 35 | function promoteSourceUrlPostprocessor () { 36 | this.process((doc, html) => 37 | doc.hasAttribute('promote-data-source-url') 38 | ? html.replace(/]*)(>]*)?> *\[data-source-url=(.+?)\]\n/g, '') 39 | : html 40 | ) 41 | } 42 | 43 | function computeIndent (lines) { 44 | let indent, currentIndent 45 | for (const line of lines) { 46 | const currentIndent = (line.match(INDENT_RX) || [''])[0].length 47 | if ((indent == null || indent > currentIndent) && (indent = currentIndent) === 0) break 48 | } 49 | return indent ? ' '.repeat(indent) : '' 50 | } 51 | 52 | function resolveLineRangeFragment (contents, attrs) { 53 | const tagName = attrs.tag 54 | if (!tagName) return '' 55 | const range = [] 56 | let lineNum = 0 57 | contents.split(NEWLINE_RX).some((line) => { 58 | lineNum++ 59 | let m 60 | if (~line.indexOf('::') && (m = line.match(TAG_DIRECTIVE_RX))) { 61 | const thisTagName = m[2] 62 | if (thisTagName !== tagName) return false 63 | if (m[1]) { 64 | if (range[0]) { 65 | range[1] = `L${lineNum - 1}` 66 | return true 67 | } 68 | } else { 69 | range[0] = `L${lineNum + 1}` 70 | } 71 | } 72 | }) 73 | return range.length === 2 ? `#${[...new Set(range)].join('-')}` : '' 74 | } 75 | 76 | function register (registry, context) { 77 | registry.includeProcessor(initSourceUrlIncludeProcessor(context)) 78 | registry.postprocessor(promoteSourceUrlPostprocessor) 79 | } 80 | 81 | module.exports.register = register 82 | -------------------------------------------------------------------------------- /home/modules/ROOT/assets/images/white-logos/wells-fargo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | white logowells fargo 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/install-git-and-editor.adoc: -------------------------------------------------------------------------------- 1 | = Install Git and an AsciiDoc Editor 2 | :url-vs-docs: https://code.visualstudio.com/docs/setup 3 | :url-linux: {url-vs-docs}/linux 4 | :url-mac: {url-vs-docs}/mac 5 | :url-windows: {url-vs-docs}/windows 6 | 7 | To get started with authoring Couchbase documentation, you need to: 8 | 9 | . <> 10 | . <> 11 | . <> 12 | 13 | [#gh-account] 14 | == Create a GitHub Account 15 | 16 | The Couchbase documentation is stored on GitHub, so if you do not have a GitHub account, you need to https://github.com/join[create one^]. 17 | 18 | If you're an official member of the Documentation team, other team members should help add your GitHub to the correct organizations, groups, and repositories on GitHub. 19 | Couchbase does not provide you with a GitHub account. 20 | 21 | [#install-git] 22 | == Download and Install Git 23 | 24 | To clone and work with Git repositories on your device, or what's known as local repositories, install Git using your operating system's package manager. 25 | Alternatively, you can download it from the https://git-scm.com/downloads[Git project^]. 26 | 27 | === Install GitHub Desktop 28 | 29 | If you're more comfortable working with a visual interface for interacting with Git, instead of using the command line and a terminal, consider installing https://desktop.github.com/[GitHub Desktop^]. 30 | 31 | GitHub Desktop makes it easier to interact with Git and provides a fast way to xref:set-up-repository.adoc#clone-the-repository[clone new repositories] onto your computer. 32 | 33 | You can also just use <> and its integrated interface for Git. 34 | 35 | [#install-editor] 36 | == Install an AsciiDoc Editor 37 | 38 | NOTE: The current recommendation is to install VS Code. 39 | 40 | AsciiDoc is the markup language Couchbase uses for writing documentation. 41 | You can write an AsciiDoc document using a plain text editor or integrated development environment (IDE). 42 | If you do not have a preferred text editor or IDE, install VS Code and the listed AsciiDoc packages for an enhanced experience. 43 | 44 | [#install-vs-code] 45 | === Download and Install VS Code 46 | 47 | Visual Studio Code is a free, open-source code editor that runs on all platforms. 48 | 49 | . Go to the https://code.visualstudio.com/[VS Code home page^]. 50 | The VS Code home page should detect your operating system automatically and provide the correct download options. 51 | . Download and install VS Code. 52 | Use the links below for additional installation instructions. 53 | ** {url-linux}[VS Code for Linux^] 54 | ** {url-mac}[VS Code for macOS^] 55 | ** {url-windows}[VS Code for Windows^] 56 | 57 | [#adoc-packages] 58 | === Install the AsciiDoc Packages 59 | 60 | After you have installed VS Code: 61 | 62 | . Start VS Code and go click btn:[Extensions] beside the file explorer panel, or press kbd:[Ctrl+Shift+X]. 63 | . In the *Search extensions in Marketplace* field, search for and install the following packages: 64 | 65 | AsciiDoc:: 66 | The `AsciiDoc` package by `asciidoctor` provides some nice-to-have features for editing AsciiDoc files in VS Code. 67 | 68 | Vale VSCode:: 69 | The `Vale VSCode` package by `Chris Chinchilla` powers in-editor text linting, including a spellchecker, that the Documentation team uses on all documentation files. 70 | 71 | + 72 | You could also consider installing: 73 | 74 | GitHub Pull Requests:: 75 | This official GitHub extension lets you create GitHub pull requests directly inside VS Code. 76 | You will need to create pull requests for any changes you want to add to the documentation. 77 | 78 | == Next Step 79 | 80 | xref:install-antora.adoc[Install Antora]. 81 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/edit-pages.adoc: -------------------------------------------------------------------------------- 1 | = Edit Existing Documentation 2 | 3 | Use the following as a reference for how to edit documentation using VS Code. 4 | You can choose to write AsciiDoc in a plain text editor, or whichever integrated development environment (IDE) you prefer. 5 | 6 | The Documentation team recommends VS Code due to the extensions available, such as Vale, for running automated checks on your documentation. 7 | 8 | TIP: See the https://code.visualstudio.com/docs/getstarted/userinterface[VS Code documentation^] for an overview of the user interface, and to get more familiar with how to work in VS Code. 9 | 10 | == General Editing Steps Using VS Code 11 | 12 | In general, to edit an existing page of the documentation in VS Code: 13 | 14 | . Start VS Code. 15 | . On the *Welcome* tab, click btn:[Open Folder]. 16 | . Select the folder on your computer where you xref:set-up-repository.adoc[cloned the documentation repository]. 17 | . Click btn:[Select Folder]. 18 | + 19 | TIP: If you enabled the *Open with Code* context menu action when you installed VS Code, you can quickly open a repository from your file explorer instead of following these steps. 20 | Open the folder in the file explorer, and from the top level of the repository's directory, right-click and click *Open with Code*. 21 | . xref:create-branches.adoc[Create a new working branch] for your documentation changes. 22 | . Click image:explorer.png["The Explorer icon from the VS Code editor. It shows 2 overlapping pieces of paper.",20] btn:[Explorer]. 23 | . In the Explorer pane, locate the file for the page, partial, or example you want to edit. 24 | . Double-click the file to open it in an editor pane. 25 | . Make edits to the content. 26 | + 27 | For AsciiDoc help, see xref:basics.adoc[]. 28 | For style conventions, see xref:styleguide:index.adoc[]. 29 | . Do one of the following: 30 | .. Press kbd:[CTRL + S] to save the file. 31 | .. Go to menu:File[Auto Save] to toggle auto-save for your editor. 32 | 33 | To check your edits, xref:test-site.adoc[configure and build a local test site]. 34 | 35 | == Use Find and Replace 36 | 37 | To speed up making edits to multiple instances of a word, attribute, link, or other text in a file, use VS Code's *Find and Replace* feature. 38 | 39 | To use Find and Replace: 40 | 41 | . Click image:search.png["The Search icon from the VS Code editor. It shows a magnifying glass.",20] btn:[Search]. 42 | . In the *Search* field, enter the term you want to find and press kbd:[Enter] to search. 43 | . Click the caret (`>`) next to the text field to show the *Replace* field. 44 | . Enter the term you want to use to replace your search term. 45 | + 46 | TIP: If your search term appears in different casing that you want to preserve through your search results, you can click btn:[AB (Preserve Case)] on the *Replace* field to keep the original casing in your replacement. 47 | . Do one of the following: 48 | .. To replace every instance in your search results, next to the *Replace* field, click btn:[Replace All]. 49 | .. To replace every instance in a specific file in your search results, point to a filename in your results, and next to the file path, click btn:[Replace All] when it appears. 50 | .. To replace individual instances in your search results, point to a result, and click btn:[Replace] when it appears. 51 | 52 | VS Code's Find and Replace supports case and whole word matching, as well as regular expressions. 53 | 54 | You can also click btn:[... (Toggle Search Details)] to add or remove directories or individual files from your search results. 55 | 56 | == Next Steps 57 | 58 | . xref:test-site.adoc[Create a local playbook and build the site using your changes]. 59 | . xref:send-pr.adoc[Stage and commit your changes]. 60 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = Couchbase Documentation Site 2 | :idprefix: 3 | :idseparator: - 4 | // Settings: 5 | :hide-uri-scheme: 6 | // URLs: 7 | :url-docs: https://docs.couchbase.com 8 | :url-contribute: {url-docs}/home/contribute/ 9 | :url-org: https://github.com/couchbase 10 | :url-ui: {url-org}/docs-ui 11 | :url-license: https://creativecommons.org/licenses/by-nc-sa/4.0/ 12 | 13 | This is the Antora playbook project (aka site build) for the Couchbase documentation site published at {url-docs}. 14 | 15 | == Prerequisites 16 | 17 | We generally aim to run Node at the "Current LTS (Long Term Support)" version. 18 | See https://nodejs.org/en/about/previous-releases for details on Node's release schedule. 19 | 20 | Run: 21 | 22 | node -v 23 | 24 | to compare your version with the current installed one. 25 | We suggest using `nvm` to manage versions of node. 26 | 27 | == Playbook 28 | 29 | The playbook, defined in the playbook file [.path]_antora-playbook.yml_, configures the build for this site. 30 | The playbook specifies the content sources (repository and branches), site URL, UI bundle URL, global AsciiDoc attributes, and Asciidoctor extensions. 31 | 32 | === Building the site 33 | 34 | This is documented for the Couchbase docs team on [Confluence](https://confluence.issues.couchbase.com/wiki/spaces/DOCS/pages/2099578216/Building+the+Docs+Site). 35 | 36 | If you do not have access to Confluence, you may wish to review the [Antora documentation](https://docs.antora.org/antora/latest/). 37 | 38 | A helper script at `scripts/preview` simplifies this for some common cases. 39 | 40 | == Home Docs Component 41 | 42 | The [.path]_home/_ directory in this repository contains the source for the Home documentation component. 43 | All other content is sourced from separate repositories and branches. 44 | 45 | == Custom Asciidoctor Extensions 46 | 47 | The custom extensions in the [.path]_lib/_ directory process the manpage macro (Couchbase CLI and Backup components), Swagger UI macro, and multi-row table headers. 48 | 49 | == Tests 50 | 51 | Run `npm test` to run some basic checks on our custom extensions. 52 | 53 | == Reference Validation 54 | 55 | Reference validation, which covers xrefs, includes, and images, is performed automatically when Antora runs. 56 | The validation errors will be shown in the log output. 57 | 58 | Currently, validation is not enforced, meaning the build will not fail if an invalid reference is detected. 59 | 60 | === Reading the Log Output 61 | 62 | If there are reference violations (e.g., broken xrefs), a report of those violations will be printed to the terminal or CI log. 63 | Here's an excerpt from that report: 64 | 65 | .... 66 | [03:39:51.926] ERROR (asciidoctor): target of xref not found: csharp:gs-prereqs.adoc 67 | file: modules/csharp/pages/querybuilder.adoc 68 | source: https://github.com/couchbaselabs/docs-couchbase-lite (refname: release/3.0) 69 | [03:26:50.579] ERROR (asciidoctor): target of xref not found: server:fts:fts-using-analyzers.adoc#token-filters 70 | file: docs/public/modules/clusters/pages/search-service/create-full-text-indexes.adoc 71 | source: https://github.com/couchbasecloud/couchbase-cloud (refname: main, start path: docs/public) 72 | .... 73 | 74 | Each message shows the repository source, the refname, and the path from the root of that repository. 75 | 76 | == Contributing 77 | 78 | NOTE: somewhat out of date 79 | 80 | To learn how to use the playbook and generate the docs site locally, see our {url-contribute}[contributing guide]. 81 | 82 | == License 83 | 84 | Couchbase Server Documentation © 2025 by Couchbase Inc. is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International. 85 | 86 | See the LICENSE file or the {url-license}[Creative Commons CC BY-NC-SA 4.0 license page] for details. 87 | -------------------------------------------------------------------------------- /home/modules/contribute/examples/local-staging-antora-playbook.yml: -------------------------------------------------------------------------------- 1 | site: 2 | title: Couchbase Docs (Staging) 3 | url: https://docs-staging.couchbase.com 4 | start_page: home::index.adoc 5 | robots: allow 6 | keys: 7 | google_analytics: GTM-MVPNN2 8 | nav_groups: | 9 | [ 10 | { "title": "Server", "startPage": "home::server.adoc", "components": ["server"] }, 11 | { "title": "Capella", "startPage": "cloud::index.adoc", "components": ["cloud"] }, 12 | { "title": "SDKs", "startPage": "home::sdk.adoc", "components": ["*-sdk", "cxx-txns", "elasticsearch-connector", "kafka-connector", "spark-connector", "tableau-connector", "sdk-extensions"] }, 13 | ] 14 | content: 15 | branches: release/* 16 | sources: 17 | - url: . 18 | branches: HEAD 19 | start_path: home 20 | - url: https://github.com/couchbase/couchbase-cli.git 21 | branches: [trinity, morpheus] 22 | start_path: docs 23 | # NOTE server-docs is currently after other server repos so nav key wins 24 | - url: ~/Couchbase/docs/docs-server/ 25 | branches: [release/8.0 release/7.6] 26 | - url: ~/Couchbase/docs/docs-sdk-common/ 27 | branches: [release/8.0, release/7.7, release/7.6.6, release/7.6.2, release/7.6, temp/7.5, release/7.2, release/7.1.2, release/7.1] 28 | - url: ~/Couchbase/docs/docs-sdk-c/ 29 | branches: [release/3.4, release/3.3] 30 | - url: ~/Couchbase/docs/docs-sdk-cxx/ 31 | branches: [release/1.2, release/1.1] 32 | - url: ~/Couchbase/docs/docs-sdk-dotnet/ 33 | branches: [release/3.8, release/3.7] 34 | - url: ~/Couchbase/docs/docs-sdk-go/ 35 | branches: [release/2.11, release/2.10] 36 | - url: ~/Couchbase/docs/docs-sdk-java/ 37 | branches: [release/3.10, release/3.9] 38 | - url: ~/Couchbase/docs/docs-sdk-kotlin/ 39 | branches: [release/3.10, release/3.9] 40 | - url: ~/Couchbase/docs/docs-sdk-nodejs/ 41 | branches: [release/4.6, release/4.5] 42 | - url: ~/Couchbase/docs/docs-sdk-php/ 43 | branches: [release/4.4, release/4.3] 44 | - url: ~/Couchbase/docs/docs-sdk-python/ 45 | branches: [release/4.5, release/4.4] 46 | - url: ~/Couchbase/docs/docs-sdk-ruby/ 47 | branches: [release/3.7 release/3.6] 48 | - url: ~/Couchbase/docs/docs-sdk-rust/ 49 | branches: [release/1.0] 50 | - url: ~/Couchbase/docs/docs-sdk-scala/ 51 | branches: [release/3.10, release/3.9] 52 | 53 | 54 | asciidoc: 55 | attributes: 56 | site-navigation-data-path: _/js/site-navigation-data.js 57 | enable-cmos: '' 58 | max-include-depth: 10 59 | page-partial: false 60 | experimental: '' 61 | idprefix: '@' 62 | idseparator: '-@' 63 | tabs: tabs 64 | tabs-sync-option: '' 65 | toc: ~ 66 | page-chatbot-origin: https://d2sozpdiqok6m4.cloudfront.net # original Improving Canada bot 67 | page-toclevels: 1@ 68 | page-rank: 50@ 69 | xrefstyle: short 70 | enterprise: https://www.couchbase.com/products/editions[ENTERPRISE EDITION] 71 | community: https://www.couchbase.com/products/editions[COMMUNITY EDITION] 72 | sqlpp: SQL++ 73 | sqlppc: SQL++ for Capella Analytics 74 | sqlppea: SQL++ for Enterprise Analytics 75 | sqlpp_url: https://www.couchbase.com/products/n1ql 76 | cbpp: Couchbase++ 77 | kroki-server-url: ~ 78 | kroki-fetch-diagram: true 79 | 80 | extensions: 81 | - ./lib/source-url-include-processor.js 82 | - ./lib/json-config-ui-block-macro.js 83 | - ./lib/inline-man-macro.js 84 | - ./lib/multirow-table-head-tree-processor.js 85 | - ./lib/swagger-ui-block-macro.js 86 | - ./lib/markdown-block.js 87 | - ./lib/template-block.js 88 | - asciidoctor-kroki 89 | - asciidoctor-external-callout 90 | - '@asciidoctor/tabs' 91 | 92 | ui: 93 | bundle: 94 | url: https://github.com/couchbase/docs-ui/releases/download/prod-218/ui-bundle.zip 95 | output: 96 | dir: ./public 97 | runtime: 98 | fetch: true 99 | -------------------------------------------------------------------------------- /docsearch/docsearch-config.json.hbs: -------------------------------------------------------------------------------- 1 | { 2 | "index_name": "prod_docs_couchbase", 3 | "start_urls": [ 4 | {{#each components}} 5 | {{#if (eq ./name "home")}} 6 | { 7 | "url": "{{{@root.url}}}/{{{./name}}}/contribute/", 8 | "extra_attributes": { 9 | "component_title": "{{{./title}}}", 10 | "component_version": ["{{{./name}}}", "{{{./name}}}"], 11 | "component": "{{{./name}}}", 12 | "version_rank": 1 13 | }, 14 | "selectors_key": "contribute", 15 | "page_rank": -1 16 | }{{#if (gt ../components.length 2)}},{{/if}} 17 | {{/if}} 18 | {{/each}} 19 | {{#each (versioned components)}} 20 | {{#each versions}} 21 | { 22 | "url": "{{{@root.url}}}/{{{../name}}}/{{#if (eq ./version ../latest)}}current{{else}}{{{./version}}}{{/if}}/", 23 | "extra_attributes": { 24 | "component_title": "{{{../title}}}", 25 | "component_version": ["{{{../name}}}@{{{./version}}}"{{#if (eq ./version ../latest)}}, "{{{../name}}}"{{/if}}], 26 | "component": "{{{../name}}}", 27 | "version": "{{{./version}}}", 28 | {{#with ./displayVersion}} 29 | "display_version": "{{{this}}}", 30 | {{/with}} 31 | "version_rank": {{{rank ../versions this ../latest}}} 32 | } 33 | {{#unless @last}} 34 | }, 35 | {{/unless}} 36 | {{/each}} 37 | }{{#if @last}}{{#if (lookup (versionless ../components) "length")}},{{/if}}{{else}},{{/if}} 38 | {{/each}} 39 | {{#each (versionless components)}} 40 | { 41 | "url": "{{{@root.url}}}/{{{./name}}}/", 42 | "extra_attributes": { 43 | "component_title": "{{{./title}}}", 44 | "component_version": ["{{{./name}}}", "{{{./name}}}"], 45 | "component": "{{{./name}}}", 46 | "version_rank": 1 47 | } 48 | }{{#unless @last}},{{/unless}} 49 | {{/each}} 50 | ], 51 | "sitemap_urls": [ 52 | "{{{url}}}/sitemap.xml" 53 | ], 54 | "scrape_start_urls": true, 55 | "stop_urls": [], 56 | "selectors": { 57 | "default": { 58 | "lvl0": { 59 | "global": true, 60 | "selector": ".component-frame h4.title > span, .component-frame .component" 61 | }, 62 | "lvl1": ".doc > .page-heading-title > h1.page, .landing-page-doc > h1:first-child.sect0", 63 | "lvl2": ".doc .sect1 > h2:first-child", 64 | "lvl3": ".doc .sect2 > h3:first-child", 65 | "lvl4": ".doc .sect3 > h4:first-child", 66 | "text": ".doc p, .doc dt" 67 | }, 68 | "contribute": { 69 | "lvl0": { 70 | "default_value": "Contributing Guide", 71 | "global": true, 72 | "selector": ".navbar .component" 73 | }, 74 | "lvl1": ".doc > .page-heading-title > h1.page", 75 | "lvl2": ".doc .sect1 > h2:first-child", 76 | "lvl3": ".doc .sect2 > h3:first-child", 77 | "lvl4": ".doc .sect3 > h4:first-child", 78 | "text": ".doc p, .doc dt, .doc td" 79 | } 80 | }, 81 | "selectors_exclude": [ 82 | ".doc .admonitionblock", 83 | ".doc table.tableblock" 84 | ], 85 | "min_indexed_level": 1, 86 | "custom_settings": { 87 | "advancedSyntax": true, 88 | "attributesForFaceting": [ 89 | "component", 90 | "component_version" 91 | ], 92 | "attributesToRetrieve": [ 93 | "anchor", 94 | "component_title", 95 | "component_version", 96 | "display_version", 97 | "content", 98 | "hierarchy", 99 | "url" 100 | ], 101 | "attributesToSnippet": [ 102 | "content:25" 103 | ], 104 | "customRanking": [ 105 | "desc(weight.page_rank)", 106 | "asc(version_rank)", 107 | "desc(weight.level)", 108 | "asc(weight.position)" 109 | ], 110 | "hitsPerPage": 20, 111 | "paginationLimitedTo": 500 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/set-up-repository.adoc: -------------------------------------------------------------------------------- 1 | = Set Up Documentation Repositories 2 | 3 | To contribute to the Couchbase Documentation, you need to get the repository that contains the documentation files onto your computer. 4 | For a quick overview on some terminology and concepts related to GitHub repositories, see https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories[About repositories in the GitHub Documentation^]. 5 | 6 | You only need to do these steps the first time you contribute to a repository. 7 | 8 | == Find the Correct Repository 9 | 10 | To start, you need to know which Couchbase Documentation repository contains the files you need to edit. 11 | 12 | TIP: You can quickly find the correct repository for a page by using the image:edit.svg[,16,role=icon] *Edit on GitHub* button at the top of a page on the Couchbase Docs site. 13 | 14 | Couchbase Documentation repositories are usually prefixed with `docs-`. 15 | 16 | [#clone] 17 | == Clone the Repository 18 | 19 | NOTE: Contributors from outside Couchbase need to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo[fork documentation repositories^] to contribute changes. 20 | If you're a Couchbase employee, DO NOT fork repositories to contribute to Couchbase Documentation. 21 | 22 | After you have found the repository that you want to work in, you need to clone it onto your computer: 23 | 24 | . On the GitHub page for the repository, click btn:[Code]. 25 | . In the *Local* tab, do one of the following: 26 | .. To copy a command to use in your terminal, click btn:[HTTPS] and then the btn:[Copy] icon. 27 | Continue to <> 28 | .. To clone the repository using xref:install-git-and-editor.adoc#install-github-desktop[GitHub Desktop], click btn:[Open with GitHub Desktop]. 29 | Continue to <>. 30 | .. To clone the repository using VS Code, see <>. 31 | 32 | === Clone with the Command Line 33 | 34 | To continue cloning the repository with the command line: 35 | 36 | . Do one of the following: 37 | .. Create a new folder on your computer where you want to store the files for the new repository. 38 | Consider giving the folder the same name as the repository. 39 | .. Select an existing folder where you want to store the files for the new repository. 40 | . Open a new terminal window. 41 | . In your terminal, enter the following command, replacing `` with the path to your folder from Step 1, and press kbd:[Enter]: 42 | + 43 | ---- 44 | $ cd 45 | ---- 46 | . Type `git clone`, paste the URL you copied from GitHub, and press kbd:[Enter]. 47 | The command should look similar to the following: 48 | + 49 | ---- 50 | git clone https://github.com/couchbaselabs/docs-devex.git 51 | ---- 52 | 53 | Wait for the clone process to finish downloading the main branch of the repository onto your computer. 54 | 55 | === Clone with GitHub Desktop 56 | 57 | To continue cloning the repository with GitHub Desktop, follow the instructions in the https://docs.github.com/en/desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop[GitHub Desktop documentation^]. 58 | 59 | Wait for the clone process to finish downloading the main branch of the repository onto your computer. 60 | 61 | === Clone with VS Code 62 | 63 | To clone a repository using VS Code, follow the instructions in the https://code.visualstudio.com/docs/sourcecontrol/intro-to-git#_open-a-git-repository[VS Code documentation^]. 64 | 65 | == Next Steps 66 | 67 | . xref:workflow-overview.adoc[Get an overview of the entire contributing workflow]. 68 | . xref:create-branches.adoc#base-branch[Choose a base branch]. 69 | . xref:create-branches.adoc#work-branch-vs-code[Create a working branch in VS Code] or xref:create-branches.adoc#work-branch-cli[from the command line]. 70 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/component-configuration.adoc: -------------------------------------------------------------------------------- 1 | :page-status: OUT OF DATE 2 | 3 | = Component Structure and Configuration 4 | 5 | NOTE: {out-of-date} 6 | 7 | == Terminology and Structure 8 | 9 | include::partial$component-terms.adoc[] 10 | 11 | [#config] 12 | == Configuring a Component 13 | 14 | Usually, you only edit the component descriptor file, _antora.yml_, when cutting a release branch and registering or deregistering a navigation file. 15 | The component descriptor assigns metadata to each component-version and used to build its page IDs, navigation menus, and URL segments. 16 | The following example shows the configuration for Couchbase Server 5.5 that's specified in its _antora.yml_ file. 17 | 18 | .antora.yml for Couchbase Server 5.5 19 | [source#primary,yaml] 20 | ---- 21 | name: server 22 | title: Couchbase Server 23 | version: '5.5' 24 | start_page: introduction:intro.adoc 25 | nav: 26 | - modules/ROOT/nav.adoc 27 | ---- 28 | 29 | `name`:: The component coordinate used when creating an xref:cross-references.adoc#component-coordinate[xref from a page in one component to a page in another component]. 30 | 31 | `title`:: The component name displayed in the xref:nav-menus-and-files.adoc[component and component version selector menus]. 32 | 33 | `version`:: The version coordinate used when locking an xref destination target to a specific version of a page. 34 | Writers rarely use this coordinate because in-component xrefs target pages in the same component-version by default, and xrefs that link to pages in other components automatically jump to the latest version of the other component. 35 | + 36 | The UI uses `version` to sort component-versions in the xref:nav-menus-and-files.adoc[component version selector menu]. 37 | 38 | `version_title`:: The version name displayed in the xref:nav-menus-and-files.adoc[component version selector menu]. 39 | If this key isn't set, the value of `version` is used instead. 40 | 41 | `start_page`:: By default, Antora looks in ROOT for the file _index.adoc_ and uses it as the start page for a component. 42 | If ROOT doesn't contain _index.adoc_ (or you don't want to use that file as the component's start page), you must explicitly set a start page using its page ID. 43 | 44 | `nav`:: The nav key accepts a list of xref:nav-menus-and-files.adoc#nav-file[navigation file] paths. 45 | The order of the values dictates the order the contents of the navigation files are assembled in the published xref:nav-menus-and-files.adoc#component-menu[component menu]. 46 | 47 | == Supplemental Component Descriptor Files 48 | 49 | The Server component is aggregated from the _docs-server_, _couchbase-cli_, _backup_, and _asterix-opt_ repositories. 50 | When parts of a component are stored in multiple repositories, one _antora.yml_ file acts as the primary component descriptor. 51 | The primary file contains the `name`, `title`, `version`, and `nav` configuration. 52 | The component descriptor files in the other repositories are supplemental. 53 | They only contain `name` and `version`, so Antora can classify the content files`' component-versions. 54 | 55 | The following _antora.yml_ file supplements the <> shown in the previous section. 56 | 57 | .Supplemental _antora.yml_ in couchbase-cli repository 58 | [source,yaml] 59 | ---- 60 | name: server 61 | version: '5.5' 62 | ---- 63 | 64 | Before releasing a new version of the Couchbase Server component to the production site, all of the repositories that contribute documentation to Server must have a branch containing a matching component-version. 65 | Otherwise, the new version will be missing pages and contain broken links. 66 | 67 | == Learn More 68 | 69 | * xref:cross-references.adoc#component-coordinate[Reference (xref) a page in another component]. 70 | * xref:update-nav.adoc[Update a navigation file]. 71 | 72 | //== Additional Resources 73 | 74 | //* component descriptor 75 | //* register nav 76 | //* modules 77 | -------------------------------------------------------------------------------- /scripts/populate-icon-defs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // Prerequisite: 4 | // 5 | // $ npm --no-package-lock i 6 | // 7 | // Usage: 8 | // 9 | // $ node populate-icon-defs.js ../public 10 | // 11 | const { promises: fsp } = require('fs') 12 | const ospath = require('path') 13 | const iconPacks = { 14 | fas: (() => { 15 | try { 16 | return require('@fortawesome/pro-solid-svg-icons') 17 | } catch (e) { 18 | return require('@fortawesome/free-solid-svg-icons') 19 | } 20 | })(), 21 | far: (() => { 22 | try { 23 | return require('@fortawesome/pro-regular-svg-icons') 24 | } catch (e) { 25 | return require('@fortawesome/free-regular-svg-icons') 26 | } 27 | })(), 28 | fal: (() => { 29 | try { 30 | return require('@fortawesome/pro-light-svg-icons') 31 | } catch (e) { 32 | console.log('FontAwesome Light icons not found.') 33 | return null } 34 | })(), 35 | fab: require('@fortawesome/free-brands-svg-icons'), 36 | } 37 | iconPacks.fa = iconPacks.fas 38 | const iconShims = require('@fortawesome/fontawesome-free/js/v4-shims').reduce((accum, it) => { 39 | accum['fa-' + it[0]] = [it[1] || 'fas', 'fa-' + (it[2] || it[0])] 40 | return accum 41 | }, {}) 42 | 43 | const ICON_SIGNATURE_CS = ' { 49 | return dirents.reduce(async (accum, dirent) => { 50 | const entries = dirent.isDirectory() 51 | ? await runOnHtmlFiles(ospath.join(dir, dirent.name), fn) 52 | : (dirent.name.endsWith('.html') ? await fn(ospath.join(dir, dirent.name)) : undefined) 53 | return entries && entries.length ? (await accum).concat(entries) : accum 54 | }, []) 55 | }) 56 | } 57 | 58 | function camelCase (str) { 59 | return str.replace(/-(.)/g, (_, l) => l.toUpperCase()) 60 | } 61 | 62 | function scanForIconNames (dir) { 63 | return runOnHtmlFiles(dir, (path) => 64 | fsp.readFile(path).then((contents) => 65 | contents.includes(ICON_SIGNATURE_CS) 66 | ? contents.toString().match(ICON_RX).map((it) => it.substr(10)) 67 | : undefined 68 | ) 69 | ).then((scanResult) => [...new Set(scanResult)]) 70 | } 71 | 72 | ;(async () => { 73 | const siteDir = process.argv[2] || 'public' 74 | const iconDefsFile = ospath.join(siteDir, '_/js/vendor/fontawesome-icon-defs.js') 75 | const iconDefs = await scanForIconNames(siteDir).then((iconNames) => 76 | fsp.readFile(iconDefsFile, 'utf8').then((contents) => { 77 | try { 78 | const requiredIconNames = JSON.parse(contents.match(REQUIRED_ICON_NAMES_RX)[1].replace(/'/g, '"')) 79 | iconNames = [...new Set(iconNames.concat(requiredIconNames))] 80 | } catch (e) {} 81 | }).then(() => 82 | iconNames.reduce((accum, iconKey) => { 83 | const [iconPrefix, iconName] = iconKey.split(' ').slice(0, 2) 84 | let iconDef = (iconPacks[iconPrefix] || {})[camelCase(iconName)] 85 | if (iconDef) { 86 | return accum.set(iconKey, { ...iconDef, prefix: iconPrefix }) 87 | } else if (iconPrefix === 'fa') { 88 | const [realIconPrefix, realIconName] = iconShims[iconName] || [] 89 | if ( 90 | realIconName && 91 | !accum.has((iconKey = `${realIconPrefix} ${realIconName}`)) && 92 | (iconDef = (iconPacks[realIconPrefix] || {})[camelCase(realIconName)]) 93 | ) { 94 | return accum.set(iconKey, { ...iconDef, prefix: realIconPrefix }) 95 | } 96 | } 97 | return accum 98 | }, new Map()) 99 | ) 100 | ) 101 | await fsp.writeFile(iconDefsFile, `window.FontAwesomeIconDefs = ${JSON.stringify([...iconDefs.values()])}\n`, 'utf8') 102 | })() 103 | -------------------------------------------------------------------------------- /home/modules/contribute/partials/component-terms.adoc: -------------------------------------------------------------------------------- 1 | All Couchbase Documentation repositories use a standard directory structure and some common files and features. 2 | This ensures that Antora can locate the documentation components, collect the content files, and then build docs.couchbase.com. 3 | 4 | Here are some key terms for Couchbase Documentation repositories and files: 5 | 6 | Component:: 7 | A component contains: 8 | * AsiiDoc content files 9 | * Assets, like images 10 | * Examples, like code samples 11 | * Navigation files 12 | * A component descriptor file (`antora.yml`). 13 | + 14 | All of the files in a component are versioned together, based on the `antora.yml`. 15 | + 16 | Components can sometimes be distributed across several GitHub repositories. 17 | For example, the component for the Server documentation is built from `docs-server`, `couchbase-cli`, `backup`, and `asterix-opt`. 18 | 19 | All components are identified by `antora.yml` - not a repository or directory. 20 | 21 | Component Descriptor:: 22 | A component must contain a component descriptor file named _antora.yml_. 23 | When Antora finds _antora.yml_ in a repository, it knows it has located a component (or part of component). 24 | The component descriptor tags the files under its hierarchy with the specified component name and version. 25 | 26 | Component-Version:: 27 | A component version is a specific version of the documentation stored in a component. 28 | Component names and component versions do not always map to a GitHub repository and branch. 29 | They can be set and modified independently from the GitHub repository and branch structure. 30 | 31 | Module:: 32 | Modules organize content files, including text, images, and code samples, inside a component. 33 | Modules are stored under the `modules` folder in a component. 34 | Components can contain multiple modules. 35 | 36 | ROOT Module:: 37 | The `ROOT` module contains necessary top-level content associated with a component. 38 | For example, the `ROOT` module contains the navigation files for a component. 39 | When pages in the `ROOT` module are published, these pages are promoted a level above any other modules' pages in that component's URL. 40 | 41 | Navigation Files:: 42 | The `ROOT` module usually contains a navigation file called `nav.adoc`. 43 | It contains an unordered list of xref:cross-references.adoc[cross references] to documentation pages in specific modules inside the component. 44 | Antora uses navigation files to build xref:nav-menus-and-files.adoc[navigation menus] for a component. 45 | For more information about working with navigation files, see xref:update-nav.adoc[]. 46 | 47 | Pages:: 48 | A `pages` directory exists under a specific module in the `modules` directory. 49 | The `pages` directory specifically contains any AsciiDoc text files for whole pages in the Couchbase Documentation. 50 | For more information about structuring files in the `pages` directory, see xref:pages.adoc[]. 51 | 52 | [[partials-dir]]Partials:: 53 | A `partials` directory exists under a specific module in the `modules` directory. 54 | The `partials` directory contains AsciiDoc files that can be inserted inside files in the `pages` directory. 55 | This is helpful for content reuse and single-sourcing information across multiple pages. 56 | For more information about partials, see xref:includes.adoc[]. 57 | 58 | Assets:: 59 | An `assets` directory exists under a specific module in the `modules` directory. 60 | The `assets` directory can contain sub-directories, like `images`, that organize images and other multimedia files for the documentation. 61 | You can insert files in these directories into files in the `pages` directory. 62 | For more information about how to insert images into documentation, see xref:basics.adoc#images[]. 63 | 64 | [[examples-dir]]Examples:: 65 | An `examples` directory exists under a specific module in the `modules` directory. 66 | The `examples` directory contains non-AsiiDoc or image files, usually source code, for inserting as examples into the documentation. 67 | For more information about how to work with code examples, see xref:code-blocks.adoc[]. 68 | -------------------------------------------------------------------------------- /scripts/generate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | echo "🐇 Hello! Let's generate stuff!" 5 | echo 6 | 7 | help() { 8 | cat </dev/null || upfind ../$WHAT $((++DEPTH)) 84 | } 85 | 86 | ANTORA=$(upfind antora.yml) 87 | if [ -z "$ANTORA" ]; then 88 | echo Did not find 'antora.yml'. 89 | echo Run generate from a content repository under startPath! 90 | exit 1 91 | fi 92 | ANTORA=$(realpath $(dirname $ANTORA)) 93 | TOPLEVEL=$(git rev-parse --show-toplevel) 94 | export REPO=$(basename $TOPLEVEL) 95 | export BRANCH=$(git branch --show-current) 96 | 97 | export START_PATH=${ANTORA#$TOPLEVEL} 98 | START_PATH=${START_PATH#/} 99 | echo START :$START_PATH: 100 | if [[ -n "$START_PATH" ]]; then 101 | WORKFLOW_PREFIX+="generate-$START_PATH" 102 | else 103 | WORKFLOW_PREFIX+="generate" 104 | fi 105 | 106 | WORKFLOW+="-${POSITIONAL_ARGS[0]}" 107 | 108 | WORKFLOW_DIR=$TOPLEVEL/.github/workflows/ 109 | 110 | 111 | ls $WORKFLOW_DIR/$WORKFLOW_PREFIX-* 112 | 113 | if ls $WORKFLOW_DIR/$WORKFLOW_PREFIX-* 2>/dev/null 114 | then 115 | echo workflows found 116 | export WORKFLOW=$WORKFLOW_PREFIX-${POSITIONAL_ARGS[0]}.yml 117 | echo RUNNING $WORKFLOW from ${POSITIONAL_ARGS} 118 | 119 | export UUID=$(uuidgen) 120 | 121 | gh workflow run $WORKFLOW \ 122 | --ref $BRANCH \ 123 | --field uuid=${UUID} \ 124 | $FIELDS \ 125 | > /dev/null 126 | 127 | echo Requested the build at Github with UUID $UUID 128 | echo see $REPO/.github/workflows/$WORKFLOW 129 | echo 130 | 131 | 132 | for i in {1..10}; do 133 | echo Polling github... 134 | 135 | RET=$(gh run list \ 136 | -w $WORKFLOW \ 137 | --json displayTitle,url,databaseId \ 138 | | jq -r \ 139 | --arg UUID $UUID \ 140 | '.[] | select(.displayTitle | test($UUID))| .url' ) 141 | # '.[] | select(.displayTitle | test($UUID))| .databaseId' ) 142 | 143 | if [ -n "$RET" ]; then 144 | echo Opening $RET in your web browser 145 | open $RET 146 | 147 | # gh run watch $RET 148 | # gh run view $RET 149 | # # gah, this doesn't show the Job Summary easily 150 | 151 | exit 0 152 | fi 153 | 154 | sleep 3 155 | done 156 | echo Timed out. Check Github actions 157 | exit 1 158 | 159 | else 160 | echo no workflows found in $WORKFLOW_DIR, nothing to generate 161 | exit 1 162 | fi 163 | 164 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/ids.adoc: -------------------------------------------------------------------------------- 1 | :page-status: OUT OF DATE 2 | 3 | = Element IDs and Same-Page Cross References 4 | 5 | NOTE: {out-of-date} 6 | 7 | An ID is a unique name for an element. 8 | That name can only be used once in a document. 9 | Typically, an ID is used to create a cross reference and link anchor for an element. 10 | //It can also reference a style or script used by the output processor. 11 | 12 | [#assign-id] 13 | == Assigning an Element ID 14 | 15 | An ID can be assigned to a block or inline element. 16 | The ID name is prefixed with a hash (`#`) and, in most cases, placed in the first position of an attribute list. 17 | 18 | .Add an ID to Section 19 | ---- 20 | [#logging-in] 21 | === Logging in to Your Couchbase Cluster 22 | 23 | You can log in to the Couchbase cluster and explore the items created. 24 | ---- 25 | 26 | .Add an ID to a Table 27 | ---- 28 | .Distance Units 29 | [#geospatial-distance-units,cols="1,2"] 30 | |=== 31 | |Units |Specify with 32 | 33 | |inches 34 | |`in` or `inch` 35 | |=== 36 | ---- 37 | 38 | .Add an ID to a List 39 | ---- 40 | [#add-node] 41 | . Select menu:Couchbase Web Console[Servers > Add Server]. 42 | . Enter the following information and click btn:[Add Server]. 43 | ---- 44 | 45 | .Add an ID to Inline Styled Text 46 | ---- 47 | Sample buckets must be accessed according to the requirements of Couchbase [#control]_Role-Based Access Control_. 48 | ---- 49 | 50 | .Add an ID to a Code Block 51 | [#code-block-id] 52 | .... 53 | [source#verify,console] 54 | ---- 55 | $ curl localhost:8092 56 | 57 | {"couchdb":"Welcome","version":"v4.5.1-60-g3cf258d","couchbase":"5.0.2-5506-community"} 58 | ---- 59 | .... 60 | 61 | When a block has a style, like the above code block (`source`) example, the ID is attached to the end of the style. 62 | 63 | == Regular Text and List Item IDs 64 | 65 | You can assign IDs to regular text and list items, but the syntax is slightly different. 66 | 67 | * The ID *isn't* prefixed. 68 | * The ID is placed inside a double set of square brackets (`[[ ]]`). 69 | 70 | ---- 71 | . Fist step 72 | . [[step2]]Second step 73 | . Third step 74 | ---- 75 | 76 | Make sure to place the ID after ordered and unordered list markers. 77 | 78 | Description list items can also be assigned IDs. 79 | Place the ID directly in front of the term. 80 | 81 | ---- 82 | [[def-priority]]Bucket Priority:: 83 | The priority to be assigned to the current bucket's background tasks. 84 | ---- 85 | 86 | == Creating a Link to an Element in the Same Page 87 | 88 | Links between two elements on the same page are created with the same-page cross reference (also referred to as a same-page xref). 89 | Before you can reference a destination element from a same-page xref, you must <>. 90 | The link in the previous sentence was created using a same-page xref. 91 | 92 | .Same-page xref with link text to section 93 | ---- 94 | Before you can reference a destination element from an in-page xref, you must <>. <1> <2> <3> 95 | ---- 96 | <1> Same-page xrefs are defined by a double set of angle brackets (`<< >>`). 97 | <2> The ID of the destination element is entered first and followed by a comma (`,`) if the xref also contains link text. 98 | <3> Optional link text directly follows the comma (`,`). 99 | 100 | When link text isn't supplied, the title of the destination block element is displayed. 101 | If the element doesn't have a title, or is a list item, table cell, or inline element, the ID will be used as the link text. 102 | 103 | Using the previous example, if you didn't add link text, the section title would be displayed. 104 | 105 | .Same-page xref to section 106 | ---- 107 | Before you can reference a destination element from an in-page xref, you must <>. 108 | ---- 109 | 110 | This example renders as: 111 | 112 | Before you can reference a destination element from a same-page xref, you must <>. 113 | 114 | == Learn More 115 | 116 | IDs are also used by the cross reference macro (`xref:[]`) to link from one page to an element in another page. 117 | See xref:cross-references.adoc#link-to-element[Cross References] for an example and more information. 118 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/test-site.adoc: -------------------------------------------------------------------------------- 1 | = Test Your Changes Locally 2 | 3 | To build the Couchbase Documentation site on your computer, make sure that you have: 4 | 5 | * xref:install-antora.adoc[Installed Antora] 6 | * xref:playbook.adoc[Configured a local playbook file] 7 | 8 | Then, you need to start by configuring your Git credentials in Antora. 9 | 10 | == Configure Your Git Credentials 11 | 12 | If you left some remote repositories in your local playbook file, make sure you configure your GitHub credentials so Antora can access those repositories during a build: 13 | 14 | . Go to the GitHub webpage for the remote repository to make sure you have access. 15 | . https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic[Configure a classic personal access token (PAT) for your GitHub account^] with the `repo` scope. 16 | + 17 | Keep the PAT somewhere where you can copy it again later. 18 | + 19 | Make sure you also authorize your token to work with SAML single sign-on. 20 | . Open a terminal window. 21 | + 22 | NOTE: If you're on Windows, you must do the following steps with Git Bash, not any other terminal program. 23 | You should have automatically installed Git Bash when you installed Git on your computer. 24 | . Paste the following command: 25 | + 26 | [source, console] 27 | ---- 28 | git config --global credential.helper store && \ 29 | # Set the variable to the appropriate URL for the repository that you want to connect to for your build. 30 | git ls-remote -h $GITHUB_REPO_URL > /dev/null && \ 31 | git config --global --remove-section credential 32 | ---- 33 | . Paste your PAT after the first prompt, then hit kbd:[Enter] twice. 34 | + 35 | This stores your PAT in the `$HOME/.git-credentials` file on your computer. 36 | 37 | [TIP] 38 | ==== 39 | If you run into issues with a private repository when trying to run another build later, run the following command through Git Bash: 40 | 41 | [source,console] 42 | ---- 43 | git config --global credential.helper store && 44 | echo -n 'Repository URL: ' && read REPLY 45 | && git ls-remote -h $REPLY > /dev/null 46 | ---- 47 | 48 | Enter the URL of the repository that's causing your build to fail when prompted. 49 | ==== 50 | 51 | == Generate a Local Build with Antora 52 | 53 | To generate a local build of the documentation site, as configured by your local playbook file: 54 | 55 | . Open a terminal. 56 | . Navigate to the folder where you cloned the `docs-site` repository: 57 | + 58 | [source,console] 59 | ---- 60 | $ cd 61 | ---- 62 | . Enter the following command to tell Antora to run using your local playbook file: 63 | + 64 | [source,console] 65 | ---- 66 | $ antora local-antora-playbook.yml 67 | ---- 68 | 69 | Antora starts by showing the cloning progress of each repository in the playbook. 70 | Then, any AsciiDoc or Antora warning or error messages for each file in the build will show. 71 | 72 | * Warnings indicate that a file contains invalid AsciiDoc syntax. 73 | The site still builds, but pages might not display correctly if they have incorrect syntax. 74 | * Errors can indicate broken links or other issues. 75 | Some errors might cause the site build to fail. 76 | 77 | When the site build finishes, Antora should display a message saying `Site generation complete!`. 78 | The command prompt reappears in your terminal. 79 | 80 | == Review the Changes in Your Build 81 | 82 | TIP: Some terminal programs might display a prompt that lets you directly open the site build from the terminal. 83 | 84 | . Using your terminal or a file explorer, inside the `docs-site` repository, navigate to the `public` folder. 85 | . Do one of the following: 86 | .. If your operating system supports it, enter the following command into your terminal: 87 | + 88 | [source,console] 89 | ---- 90 | $ open index.html 91 | ---- 92 | .. In your file explorer, double-click `index.html`. 93 | 94 | + 95 | Your web browser should open your local build just like any other website. 96 | . Review the changes in your local build to make sure everything appears as expected. 97 | 98 | You can make changes to the files in a repository and re-run Antora locally as many times as you need. 99 | 100 | == Next Step 101 | 102 | xref:send-pr.adoc#commit[Commit your changes and push them to the remote repository]. 103 | -------------------------------------------------------------------------------- /home/modules/contribute/pages/tabs.adoc: -------------------------------------------------------------------------------- 1 | = Tabbed Content 2 | :tabs: 3 | 4 | TIP: For guidance around when to use tabbed content in your docs, see xref:styleguide:ROOT:tabs-set.adoc[]. 5 | 6 | To add tabbed content to your docs page: 7 | 8 | . Add the `:tabs:` attribute to the front matter of your `.adoc` file: 9 | + 10 | [source,asciidoc] 11 | ---- 12 | = Document Title 13 | :page-topic-type: guide 14 | :description: This is a description of the document. 15 | :page-toclevels: 3 16 | :tabs: 17 | :keywords: cmek, encryption, security, backups 18 | ---- 19 | 20 | . If you're going to add multiple tabs with the same options on your page, make sure to also add `:tabs-sync-option:`: 21 | + 22 | [source,asciidoc] 23 | ---- 24 | = Document Title 25 | :page-topic-type: guide 26 | :description: This is a description of the document. 27 | :page-toclevels: 3 28 | :tabs: 29 | :tabs-sync-option: 30 | :keywords: cmek, encryption, security, backups 31 | ---- 32 | + 33 | NOTE: Tabs will not sync across your page if tab names are not an exact match. 34 | Make sure to use the same name for each tab for `tabs-sync-option` to work as expected and sync a user's tab selection across the page. 35 | 36 | . In your `.adoc` file, start the tabbed content by adding `[{tabs}]` to a content block: 37 | + 38 | [source,asciidoc] 39 | ---- 40 | [{tabs}] 41 | ==== 42 | 43 | ==== 44 | ---- 45 | 46 | . Define the title of your first tab by marking it with 2 colons, inside the `tabs` content block: 47 | + 48 | [source,asciidoc] 49 | ---- 50 | [{tabs}] 51 | ==== 52 | My First Tab:: 53 | 54 | ==== 55 | ---- 56 | 57 | . Write the content for your first tab. 58 | Make sure that any new lines or block content are connected together using a `+` inside your tab: 59 | + 60 | [source,asciidoc] 61 | ---- 62 | [{tabs}] 63 | ==== 64 | My First Tab:: 65 | + 66 | This is the content for my first tab. 67 | I need it to display together. 68 | + 69 | I want to add a code block: 70 | + 71 | // In these examples, code blocks are marked with 3 (---) dashes to make them render correctly in the example block. 72 | // Use 4 (----) dashes in your own code blocks. 73 | [source,txt] 74 | --- 75 | Yay a code block! 76 | --- 77 | + 78 | [NOTE] 79 | -- 80 | This is a note. 81 | 82 | We need to use a different delimiter. 83 | -- 84 | ==== 85 | ---- 86 | + 87 | You can also enclose the entire contents of your tab inside a delimited open block (`--`) to reduce the number of `+` you need to add: 88 | + 89 | [source,asciidoc] 90 | ---- 91 | [{tabs}] 92 | ==== 93 | My First Tab:: 94 | + 95 | -- 96 | This is the content for my first tab. 97 | I need it to display together. 98 | 99 | I want to add a code block: 100 | 101 | // In these examples, code blocks are marked with 3 (---) dashes to make them render correctly in the example block. 102 | // Use 4 (----) dashes in your own code blocks. 103 | [source,txt] 104 | --- 105 | Yay a code block! 106 | --- 107 | + 108 | [NOTE] 109 | --- 110 | This is a note. 111 | 112 | We need to use a different delimiter. 113 | --- 114 | -- 115 | ==== 116 | ---- 117 | 118 | . Repeat for any additional tabs: 119 | + 120 | [source,asciidoc] 121 | ---- 122 | [{tabs}] 123 | ==== 124 | My First Tab:: 125 | + 126 | This is the content for my first tab. 127 | I need it to display together. 128 | + 129 | I want to add a code block: 130 | + 131 | // In these examples, code blocks are marked with 3 (---) dashes to make them render correctly in the example block. 132 | // Use 4 (----) dashes in your own code blocks. 133 | [source,txt] 134 | --- 135 | Yay a code block! 136 | --- 137 | + 138 | [NOTE] 139 | -- 140 | This is a note. 141 | 142 | We need to use a different delimiter. 143 | -- 144 | 145 | // Make sure to leave a blank line between the end of the first tab's content and your next tab title. 146 | My Second Tab:: 147 | + 148 | -- 149 | This is the second tab, even better than the first. 150 | 151 | Woohoo tabs! 152 | -- 153 | ==== 154 | ---- 155 | 156 | Your tabs should render like this: 157 | 158 | [{tabs}] 159 | ==== 160 | My First Tab:: 161 | + 162 | This is the content for my first tab. 163 | I need it to display together. 164 | + 165 | I want to add a code block: 166 | + 167 | [source,txt] 168 | ---- 169 | Yay a code block! 170 | ---- 171 | + 172 | [NOTE] 173 | -- 174 | This is a note. 175 | 176 | We need to use a different delimiter. 177 | -- 178 | 179 | My Second Tab:: 180 | + 181 | -- 182 | This is the second tab, even better than the first. 183 | 184 | Woohoo tabs! 185 | -- 186 | ==== 187 | 188 | See a tabs set in action on the xref:sync-gateway::getting-started.adoc#installation[Sync Gateway Getting Started page]. 189 | --------------------------------------------------------------------------------