Skip to content

DOC-4325: Consolidate local builds #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 11 additions & 145 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,159 +1,25 @@
= {company} {product} Docs
= {company} {product} docs
// Variables:
:company: DataStax
:product: Zero Downtime Migration
:repo-name: migration-docs
:github-org: datastax
// Settings:
:product: migration tools
// Document settings:
:toc: macro
:toclevels: 2
:idprefix:
:idseparator: -
:!example-caption:
:!figure-caption:
:!table-caption:
:experimental:
:hide-uri-scheme:
ifdef::env-github[]
:icons: font
:toclevels: 1
:toc-title: Contents
:tip-caption: :bulb:
:note-caption: :information_source:
:note-caption: :paperclip:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:badges:
endif::[]
// Project URLs:
:url-github-org: https://github.com/{github-org}
:url-project-repo: {url-github-org}/{repo-name}
:url-ui-repo: https://github.com/riptano/docs-ui
:url-playbook-repo: https://github.com/riptano/datastax-docs-site
:url-contribute:
:url-datastax: https://datastax.com
:url-datastax-docs: https://docs.datastax.com
:url-docs-preview: http://docs-preview.datastax.com
// External URLs:
:asciidoc-language: https://docs.asciidoctor.org/asciidoc/latest/

This repository contains the source files for the {company} {product} documentation.
This repository contains the https://docs.asciidoctor.org/asciidoc/latest/[AsciiDoc] source files for the {company} {product} documentation.

toc::[]

== Get started

The documentation is written in {asciidoc-language}[AsciiDoc]-formatted source files located in the `modules` directory.

=== Make a simple update

For simple updates like fixing typos or modifying existing prose, it's easiest to edit the source files directly on GitHub.

NOTE: You'll need Write privileges on the repository to edit files directly on GitHub.

. Find the file you want to edit in the `modules` directory.

. Click the *Edit* icon in the upper-right corner of the file view.

. Make your changes in the editor.

. Click *Commit changes...*

. Enter a description for your commit and click *Propose changes*.

. On the *Open a pull request* screen, enter a title and description for your change, assign reviewers, then click *Create pull request*.

. Once the pull request is open, an automatic draft preview build is triggered.
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.

=== Edit docs locally

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.

. Clone this repository
+
[source,bash,subs="attributes"]
----
git clone {url-project-repo}.git
----

. 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.
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].
+
[IMPORTANT]
====
Copy your personal access token to a temporary location -- you'll need it later.
====

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

. https://docs.antora.org/antora/latest/playbook/private-repository-auth/#populate-credentials-directly[Populate the credential store] with your personal access token.
For most people this means doing the following:
+
.. Create the file `$HOME/.git-credentials` and open it in your editor.
.. Add the following line:
+
[source,subs="verbatim,quotes"]
----
https://**TOKEN**:@github.com
----
+
Replace *`TOKEN`* with the personal access token you copied from GitHub.
.. Save and close the file.

. If you don't already have Node.js installed, do the following:

.. Install https://github.com/nvm-sh/nvm[nvm].
+
If you're on macOS, you can install nvm using https://brew.sh/[Homebrew]:
+
[source,bash]
----
brew install nvm
----

.. Use nvm to install Node.js.
+
[source,bash]
----
nvm install --lts
----
+
[source,bash]
----
nvm use --lts
----
+
[source,bash]
----
nvm alias default node
----

. Install the project dependencies.
+
[source,bash,subs="attributes"]
----
cd {repo-name}
----
+
[source,bash]
----
npm install
----

. Build the site.
+
[source,bash]
----
npm run build:local
----
+
If the build was successful, you'll see the following output in your terminal:
+
[source,console,subs="attributes"]
----
Site generation complete!
Open file:///Users/USERNAME/repos/{repo-name}/build/site/index.html in a browser to view your site.
----
+
To view the site, paste the entire `\file:///` path into your browser's address bar and press kbd:[Return].

[#publish-docs]
== Publish docs

To learn how to publish documentation to {url-datastax-docs}, see the {url-playbook-repo}#deploy-production[datastax-docs-site README].
To learn how to update the documentation, see the https://datastax.jira.com/wiki/spaces/DOCS/overview[Docs team Confluence site].
24 changes: 0 additions & 24 deletions lib/assets-processor.js

This file was deleted.

199 changes: 0 additions & 199 deletions lib/remote-include-processor.js

This file was deleted.

Loading