Skip to content

Commit e645270

Browse files
Add search dependencies (#73)
* Add search dependencies * minor edit * Remove line numbers from supplemental-ui example links * another take --------- Co-authored-by: Eric Schneider <[email protected]>
1 parent fcb0d50 commit e645270

File tree

1 file changed

+57
-2
lines changed

1 file changed

+57
-2
lines changed

README.adoc

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= DataStax Antora UI
22
// Variables:
3-
:current-release: prod-9
3+
:current-release: prod-12
44
// Settings:
55
:!example-caption:
66
:experimental:
@@ -18,9 +18,11 @@ ifdef::env-github[]
1818
endif::[]
1919
// Project URIs:
2020
:project-repo-name: riptano/antora-ui-docs
21+
:url-repo: [email protected]:{project-repo-name}.git
2122
:url-project: https://github.com/{project-repo-name}
2223
:url-site: https://docs.datastax.com
23-
:url-repo: [email protected]:{project-repo-name}.git
24+
:url-coppi: https://coppi.aws.dsinternal.org
25+
:url-docs-preview: http://docs-preview.datastax.com
2426
// External URIs:
2527
:url-antora: https://antora.org
2628
:url-git: https://git-scm.com
@@ -30,6 +32,7 @@ endif::[]
3032
:url-nvm: https://github.com/creationix/nvm
3133
:url-nvm-install: {url-nvm}#installation
3234
:url-datastax: https://datastax.com
35+
:url-docs-home: https://github.com/riptano/docs-home
3336

3437
ifdef::badges[]
3538
image:https://img.shields.io/static/v1?label=release&amp;message={current-release}&amp;color=blue[Latest Release,link={url-project}/releases/download/{current-release}/ui-bundle.zip,format=svg]
@@ -62,6 +65,58 @@ NOTE: The `snapshot` flag tells Antora to fetch the UI when the `--fetch` comman
6265
This setting is required because updates to the UI bundle are pushed to the same URL.
6366
If the URL were to be unique, this setting would not be required.
6467

68+
[#search-dependencies]
69+
=== About site search UI dependencies
70+
71+
Additional tasks must be performed in order for the site search functionality on {url-site}[docs.datastax.com] to work properly.
72+
These tasks only need to be performed when changes are made to the following files:
73+
74+
[%header.autowidth.stretch]
75+
|===
76+
|Files |Tasks
77+
78+
|{url-project}/blob/main/gcx/algoliaSearch/index.html[_gcx/algoliaSearch/index.html_]
79+
|Copy this file to the _/en/search_ directory on the {url-coppi}/en/search/[coppi] and {url-docs-preview}/en/search/[docs-preview] servers.
80+
81+
|{url-project}/tree/main/gcx/algoliaSearch/src[_gcx/algoliaSearch/src/*_]
82+
|Copy these files to the _playbooks/supplemental-ui_ directory in the {url-docs-home}/tree/main/playbooks/supplemental-ui[docs-home] repository.
83+
|===
84+
85+
In the {url-docs-home}[docs-home] repository, the {url-docs-home}/blob/main/playbooks/site-local-home.yaml[_site-local-home.yaml_] and {url-docs-home}/blob/main/playbooks/site-publish-home.yaml[_site-publish-home.yaml_] playbooks are configured to incorporate the files from the _supplemental-ui_ directory into the assets directory of the generated site:
86+
87+
[source,yaml]
88+
----
89+
ui:
90+
supplemental_files:
91+
- path: css/siteSearch.css
92+
contents: ./supplemental-ui/siteSearch.css
93+
- path: js/siteSearch.js
94+
contents: ./supplemental-ui/siteSearch.js
95+
output_dir: assets
96+
----
97+
98+
Whenever files are changed or added within the _supplemental-ui_ directory, the `home` docset must then be built and deployed to all of the docs servers to ensure that the servers have the latest site search assets.
99+
100+
[source,console]
101+
----
102+
bsys build home
103+
bsys deploy home coppi
104+
bsys deploy home docs-preview
105+
bsys sync
106+
----
107+
108+
.coppi asset locations
109+
----
110+
/var/www/en/home/assets/css/siteSearch.css
111+
/var/www/en/home/assets/js/siteSearch.js
112+
----
113+
114+
.docs-preview asset locations
115+
----
116+
/datastax/www/docs.datastax.com/en/home/assets/css/siteSearch.css
117+
/datastax/www/docs.datastax.com/en/home/assets/js/siteSearch.js
118+
----
119+
65120
== Development quickstart
66121

67122
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.

0 commit comments

Comments
 (0)