This page should NOT be embargoed!
4 | 5 |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
-
24 | {{#each $children}}
25 | {{> tree}}
26 | {{/each}}
27 |
Demo about the Feature Flag
4 | 5 |See https://github.com/couchbaselabs/docs-tooling/tree/main/flags for installation and more details.
19 |Limitations
32 |-
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 |
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 |
GitHub PR #{{number}}: {{title}} 57 | by {{author.name}} ({{state}} {{updatedAt}})
58 |59 | {{{body}}} 60 |61 | {{/with}} 62 |
63 | {{/each}}
64 |
Site Extensions
4 | 5 |Test and document your Asciidoctor.js or Antora extensions here.
19 |Markdown Block
24 |[markdown]
28 | --
29 | Filter some text with [Markdown](https://commonmark.org/help/) syntax.
30 | --
31 | Results in:
35 |Filter some text with Markdown syntax.
39 || 45 | 46 | | 47 |
48 |
49 |
53 | 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 |
54 |
58 | (And note that we use Open
55 | structural context,
56 | with
59 |
63 | 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 | |
64 |
What's Up, Doc? 🐇
79 |Generated at {{date}}
80 | 81 |Featured Pages
82 |-
83 |
- 84 | Start page 85 | 86 | {{#each pagesForReview}} 87 |
- {{$title}} 88 | (⚑) 89 | {{/each}} 90 |
GitHub PR #{{number}}: {{title}} 94 | by {{author.name}} ({{state}} {{updatedAt}})
95 |Detailed Report
101 | From this antora playbook. 102 | 103 |-
104 | {{#each tree.$children}}
105 | {{> tree}}
106 | {{/each}}
107 |
]*)(>]*)?> *\[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 |
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 |
--------------------------------------------------------------------------------