|
1 | | -= {product} Docs |
| 1 | += {product} documentation |
2 | 2 | // Variables: |
3 | 3 | :product: RAGStack |
4 | | -:repo-name: ragstack-ai |
5 | | -:github-org: datastax |
6 | 4 | // Settings: |
7 | 5 | :toc: macro |
| 6 | +:idprefix: |
| 7 | +:idseparator: - |
8 | 8 | :!example-caption: |
9 | 9 | :experimental: |
10 | 10 | :hide-uri-scheme: |
| 11 | +ifndef::env-github[:icons: font] |
11 | 12 | ifdef::env-github[] |
12 | | -:icons: font |
13 | | -:toclevels: 1 |
14 | | -:toc-title: Contents |
| 13 | +:toclevels: 2 |
15 | 14 | :tip-caption: :bulb: |
16 | | -:note-caption: :information_source: |
| 15 | +:note-caption: :paperclip: |
17 | 16 | :important-caption: :heavy_exclamation_mark: |
18 | 17 | :caution-caption: :fire: |
19 | 18 | :warning-caption: :warning: |
20 | 19 | :badges: |
21 | 20 | endif::[] |
22 | | -// Project URLs: |
23 | | -:url-github-org: https://github.com/{github-org} |
24 | | -:url-project-repo: {url-github-org}/{repo-name} |
25 | | -:url-ui-repo: https://github.com/riptano/docs-ui |
26 | | -:url-playbook-repo: https://github.com/riptano/datastax-docs-site |
27 | | -:url-contribute: |
28 | | -:url-datastax: https://datastax.com |
29 | | -:url-datastax-docs: https://docs.datastax.com |
30 | | -:url-docs-preview: http://docs-preview.datastax.com |
31 | 21 | // External URLs: |
32 | | -:asciidoc-language: https://docs.asciidoctor.org/asciidoc/latest/ |
| 22 | +:url-asciidoc-lang: https://docs.asciidoctor.org/asciidoc/latest/ |
| 23 | +:url-antora-docs: https://docs.antora.org/antora/latest/ |
33 | 24 |
|
34 | | -This repository contains the source files for the {product} documentation. |
35 | 25 |
|
36 | | -toc::[] |
| 26 | +The {product} documentation is written in https://docs.asciidoctor.org/asciidoc/latest/[AsciiDoc]. |
| 27 | +The source files in the `link:modules/[]` folder are organized into a documentation component as identified by the `link:antora.yml[]` file. |
37 | 28 |
|
38 | | -== Get started |
| 29 | +== Build the docs |
39 | 30 |
|
40 | | -The documentation is written in {asciidoc-language}[AsciiDoc]-formatted source files located in the `modules` directory. |
| 31 | +You can use https://antora.org/[Antora] to build a static HTML version of the documentation. |
41 | 32 |
|
42 | | -=== Make a simple update |
43 | | - |
44 | | -For simple updates like fixing typos or modifying existing prose, it's easiest to edit the source files directly on GitHub. |
45 | | - |
46 | | -NOTE: You'll need Write privileges on the repository to edit files directly on GitHub. |
47 | | - |
48 | | -. Find the file you want to edit in the `modules` directory. |
49 | | - |
50 | | -. Click the *Edit* icon in the upper-right corner of the file view. |
51 | | - |
52 | | -. Make your changes in the editor. |
53 | | - |
54 | | -. Click *Commit changes...* |
55 | | - |
56 | | -. Enter a description for your commit and click *Propose changes*. |
57 | | - |
58 | | -. On the *Open a pull request* screen, enter a title and description for your change, assign reviewers, then click *Create pull request*. |
59 | | - |
60 | | -. Once the pull request is open, an automatic draft preview build is triggered. |
61 | | -Once complete, the build system posts a comment on the pull request with a link to the draft site for you to preview your changes. |
62 | | - |
63 | | -=== Edit docs locally |
64 | | - |
65 | | -If you need to make substantial updates to the documentation, you'll want to clone the repository so you can work with the source files locally. |
66 | | - |
67 | | -. Clone this repository |
68 | | -+ |
69 | | -[source,bash,subs="attributes"] |
70 | | ----- |
71 | | -git clone {url-project-repo}.git |
72 | | ----- |
73 | | - |
74 | | -. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic[Create a _classic_ personal access token] for your GitHub account. |
75 | | -When configuring the token, set the *Expiration* to at least 90 days and select everything under the *Repo* https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes[scope]. |
76 | | -+ |
77 | | -[IMPORTANT] |
78 | | -==== |
79 | | -Copy your personal access token to a temporary location -- you'll need it later. |
80 | | -==== |
81 | | - |
82 | | -. https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on[Authorize your personal access token] so that it can access repositories in the Riptano and DataStax organizations in GitHub. |
83 | | - |
84 | | -. https://docs.antora.org/antora/latest/playbook/private-repository-auth/#populate-credentials-directly[Populate the credential store] with your personal access token. |
85 | | -For most people this means doing the following: |
86 | | -+ |
87 | | -.. Create the file `$HOME/.git-credentials` and open it in your editor. |
88 | | -.. Add the following line: |
89 | | -+ |
90 | | -[source,subs="verbatim,quotes"] |
91 | | ----- |
92 | | -https://**TOKEN**:@github.com |
93 | | ----- |
94 | | -+ |
95 | | -Replace *`TOKEN`* with the personal access token you copied from GitHub. |
96 | | -.. Save and close the file. |
97 | | - |
98 | | -. If you don't already have Node.js installed, do the following: |
99 | | - |
100 | | -.. Install https://github.com/nvm-sh/nvm[nvm]. |
101 | | -+ |
102 | | -If you're on macOS, you can install nvm using https://brew.sh/[Homebrew]: |
103 | | -+ |
104 | | -[source,bash] |
105 | | ----- |
106 | | -brew install nvm |
107 | | ----- |
108 | | - |
109 | | -.. Use nvm to install Node.js. |
110 | | -+ |
111 | | -[source,bash] |
112 | | ----- |
113 | | -nvm install --lts |
114 | | ----- |
115 | | -+ |
116 | | -[source,bash] |
117 | | ----- |
118 | | -nvm use --lts |
119 | | ----- |
120 | | -+ |
121 | | -[source,bash] |
122 | | ----- |
123 | | -nvm alias default node |
124 | | ----- |
125 | | - |
126 | | -. Install the project dependencies. |
127 | | -+ |
128 | | -[source,bash,subs="attributes"] |
129 | | ----- |
130 | | -cd {repo-name} |
131 | | ----- |
132 | | -+ |
133 | | -[source,bash] |
134 | | ----- |
135 | | -npm install |
136 | | ----- |
137 | | - |
138 | | -. Build the site. |
139 | | -+ |
140 | | -[source,bash] |
141 | | ----- |
142 | | -npm run build:local |
143 | | ----- |
144 | | -+ |
145 | | -If the build was successful, you'll see the following output in your terminal: |
146 | | -+ |
147 | | -[source,console,subs="attributes"] |
148 | | ----- |
149 | | -Site generation complete! |
150 | | -Open file:///Users/USERNAME/repos/{repo-name}/build/site/index.html in a browser to view your site. |
151 | | ----- |
152 | | -+ |
153 | | -To view the site, paste the entire `\file:///` path into your browser's address bar and press kbd:[Return]. |
154 | | - |
155 | | -[#publish-docs] |
156 | | -== Publish docs |
157 | | - |
158 | | -To learn how to publish documentation to {url-datastax-docs}, see the {url-playbook-repo}#deploy-production[datastax-docs-site README]. |
| 33 | +To build and preview the documentation locally, follow the instructions in the file link:local-antora-playbook.yml[] at the root of this repository. |
| 34 | +To learn more about how to build a documentation site with Antora, see the https://docs.antora.org/antora/latest/install-and-run-quickstart/[Install and Run Antora Quickstart]. |
0 commit comments