Skip to content

Commit d40ede3

Browse files
authored
Merge pull request #16 from riptano/add-instructions
add instructions for updating the ui bundle for docs
2 parents 4877440 + 536cdae commit d40ede3

File tree

1 file changed

+44
-19
lines changed

1 file changed

+44
-19
lines changed

README.adoc

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:hide-uri-scheme:
55
// Project URLs:
66
:url-project: https://github.com/riptano/antora-ui-docs
7-
:url-preview:
7+
:url-preview: https://gitlab.com/antora/antora-ui-default
88
// External URLs:
99
:url-antora: https://antora.org
1010
:url-antora-docs: https://docs.antora.org
@@ -17,30 +17,37 @@
1717
:url-nvm-install: {url-nvm}#installation
1818
:url-source-maps: https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map
1919

20-
This project is a UI bundle that can be used by {url-antora}[Antora] to generate a documentation site.
21-
You can see a preview of the default UI at {url-preview}.
20+
This project houses the elements of a UI bundle that can be used by {url-antora}[Antora] to generate a documentation site. You can see a preview of the default UI at https://gitlab.com/antora/antora-ui-default.
2221

23-
== Use the Default UI
22+
DataStax has customized the UI with the changes that are located in this repository.
23+
The elements defined are: CSS, fonts, images, helper programs, Javascript elements, layouts, and Handlebar partials (*.hbs) that are used in the layouts.
2424
25-
If you want to simply use the UI for your Antora-generated site, add the following UI configuration to your playbook:
25+
== Using the UI in Antora playbooks to build a docset
26+
27+
The UI bundle is defined in an Antora playbook YAML file, and retrieved from the designated URL.
28+
All DataStax docsets use the UI bundle defined and built from this repository.
29+
Most repositories also have supplemental files, defined in `playbooks/supplemental_ui` in the doc repository, that override the defined UI bundle and provide specific banner images for each DataStax product.
30+
31+
To use the UI bundle built in this repository, add the following UI configuration to your playbook:
2632
2733
[source,yaml]
2834
----
2935
ui:
3036
bundle:
31-
url: https://github.com/riptano/antora-ui-docs/raw/main/releases/download/v0.5/ui-bundle.zip
37+
url: https://github.com/riptano/antora-ui-docs/raw/main/releases/download/v0.8/ui-bundle.zip
3238
----
3339
34-
Read on to learn how to customize the default UI for your own documentation.
40+
Read on to learn how to customize the UI for our documentation.
3541
36-
== Development Quickstart
42+
== Developing a new UI bundle
3743
3844
This section offers a basic tutorial to teach you how to set up the UI project, preview it locally, and bundle it for use with Antora.
39-
A more comprehensive example can be found in the documentation at {url-antora-docs}.
45+
A more comprehensive example can be found in the documentation at https://docs.antora.org.
4046
4147
=== Prerequisites
4248
43-
To preview and bundle the default UI, you need the following software on your computer:
49+
In order to build a bundle, you'll want to preview your changes, and then bundle them.
50+
To do those steps, you need the following software on your computer:
4451
4552
* {url-git}[git] (command: `git`)
4653
* {url-nodejs}[Node.js] (commands: `node` and `npm`)
@@ -62,22 +69,22 @@ Next, make sure that you have Node.js installed (which also provides npm).
6269
6370
If this command fails with an error, you don't have Node.js installed.
6471
If the command doesn't report an LTS version of Node.js (e.g., v10.15.3), it means you don't have a suitable version of Node.js installed.
65-
In this guide, we'll be installing Node.js 10.
72+
In this guide, we'll be installing Node.js 16.
6673
6774
While you can install Node.js from the official packages, we strongly recommend that you use {url-nvm}[nvm] (Node Version Manager) to manage your Node.js installation(s).
6875
Follow the {url-nvm-install}[nvm installation instructions] to set up nvm on your machine.
6976
70-
Once you've installed nvm, open a new terminal and install Node.js 10 using the following command:
77+
Once you've installed nvm, open a new terminal and install Node.js 16 using the following command:
7178
72-
$ nvm install 10
79+
$ nvm install 16
7380
7481
You can switch to this version of Node.js at any time using the following command:
7582
76-
$ nvm use 10
83+
$ nvm use 16
7784
78-
To make Node.js 10 the default in new terminals, type:
85+
To make Node.js 16 the default in new terminals, type:
7986
80-
$ nvm alias default 10
87+
$ nvm alias default 16
8188
8289
Now that you have Node.js installed, you can proceed with installing the Gulp CLI.
8390
@@ -98,13 +105,13 @@ Now that you have the prerequisites installed, you can fetch and build the UI pr
98105
99106
=== Clone and Initialize the UI Project
100107
101-
Clone the Pulsar UI project using git:
108+
Clone the `github.com/riptano/antora-ui-docs` project using git:
102109
103110
[subs=attributes+]
104111
$ git clone {url-project} &&
105112
cd "`basename $_`"
106113
107-
The example above clones the Pulsar UI project and then switches to the project folder on your filesystem.
114+
The example above clones this repository and then switches to the project folder on your filesystem.
108115
Stay in this project folder when executing all subsequent commands.
109116
110117
Use npm to install the project's dependencies inside the project.
@@ -150,14 +157,30 @@ If you need to package the UI so you can use it to generate the documentation si
150157
If any errors are reported by lint, you'll need to fix them.
151158
152159
When the command completes successfully, the UI bundle will be available at [.path]_build/ui-bundle.zip_.
153-
You can point Antora at this bundle using the `--ui-bundle-url` command-line option.
160+
161+
Next, you'll need to create a new release following https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository[these instructions].
162+
Be sure to include the [.path]_build/ui-bundle.zip_ file as a binary in the release.
154163
155164
If you have the preview running, and you want to bundle without causing the preview to be clobbered, use:
156165
157166
$ gulp bundle:pack
158167
159168
The UI bundle will again be available at [.path]_build/ui-bundle.zip_.
160169
170+
=== Update documentation repository playbooks to use a new UI bundle
171+
172+
If you build a new UI bundle, all the DataStax docs repositories must be updated.
173+
The following steps must be completed in each doc repository:
174+
175+
. Create a PR branch for the work..
176+
. Update all affected playbooks with an appropriate UI bundle url.
177+
. Test if the UI is building correctly with a local build.
178+
. Get PR approval and merge the PR to the appropriate branch (`main` for most repositories).
179+
. Rebuild one updated playbook.
180+
. Deploy to coppi to review the build to ensure the latest UI changes are working.
181+
. Rebuild the documentation for all affected playbooks using the scripsi `bsys` command.
182+
. Deploy to docs-preview and sync all docsets.
183+
161184
== Copyright and License
162185
163186
Copyright (C) 2017-2020 OpenDevise Inc., the Antora Project, and DataStax, Inc.
@@ -168,3 +191,5 @@ See link:LICENSE[] to find the full license text.
168191
== Authors
169192
170193
Development of Antora is led and sponsored by {url-opendevise}[OpenDevise Inc].
194+
195+
In addition, this repository has been modified by the DataStax Documentation Team.

0 commit comments

Comments
 (0)