diff --git a/README.adoc b/README.adoc index 3afe221..6819e7c 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ = DataStax Antora UI // Variables: -:current-release: prod-9 +:current-release: prod-12 // Settings: :!example-caption: :experimental: @@ -18,9 +18,11 @@ ifdef::env-github[] endif::[] // Project URIs: :project-repo-name: riptano/antora-ui-docs +:url-repo: git@github.com:{project-repo-name}.git :url-project: https://github.com/{project-repo-name} :url-site: https://docs.datastax.com -:url-repo: git@github.com:{project-repo-name}.git +:url-coppi: https://coppi.aws.dsinternal.org +:url-docs-preview: http://docs-preview.datastax.com // External URIs: :url-antora: https://antora.org :url-git: https://git-scm.com @@ -30,6 +32,7 @@ endif::[] :url-nvm: https://github.com/creationix/nvm :url-nvm-install: {url-nvm}#installation :url-datastax: https://datastax.com +:url-docs-home: https://github.com/riptano/docs-home ifdef::badges[] image:https://img.shields.io/static/v1?label=release&message={current-release}&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 This setting is required because updates to the UI bundle are pushed to the same URL. If the URL were to be unique, this setting would not be required. +[#search-dependencies] +=== About site search UI dependencies + +Additional tasks must be performed in order for the site search functionality on {url-site}[docs.datastax.com] to work properly. +These tasks only need to be performed when changes are made to the following files: + +[%header.autowidth.stretch] +|=== +|Files |Tasks + +|{url-project}/blob/main/gcx/algoliaSearch/index.html[_gcx/algoliaSearch/index.html_] +|Copy this file to the _/en/search_ directory on the {url-coppi}/en/search/[coppi] and {url-docs-preview}/en/search/[docs-preview] servers. + +|{url-project}/tree/main/gcx/algoliaSearch/src[_gcx/algoliaSearch/src/*_] +|Copy these files to the _playbooks/supplemental-ui_ directory in the {url-docs-home}/tree/main/playbooks/supplemental-ui[docs-home] repository. +|=== + +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: + +[source,yaml] +---- +ui: + supplemental_files: + - path: css/siteSearch.css + contents: ./supplemental-ui/siteSearch.css + - path: js/siteSearch.js + contents: ./supplemental-ui/siteSearch.js + output_dir: assets +---- + +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. + +[source,console] +---- +bsys build home +bsys deploy home coppi +bsys deploy home docs-preview +bsys sync +---- + +.coppi asset locations +---- +/var/www/en/home/assets/css/siteSearch.css +/var/www/en/home/assets/js/siteSearch.js +---- + +.docs-preview asset locations +---- +/datastax/www/docs.datastax.com/en/home/assets/css/siteSearch.css +/datastax/www/docs.datastax.com/en/home/assets/js/siteSearch.js +---- + == Development quickstart 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.