Skip to content

Documentation component for TX Prevent

Notifications You must be signed in to change notification settings

ThreatX/threatx-docs-txprevent

Repository files navigation

ThreatX Documentation Component : Prevent


Introduction

Check Documentation

This repository contains the documentation source material for ThreatX Prevent. It is used by the ThreatX Documentation Site. The playbook and instructions for the site are located at ThreatX Documentation Project.

Releasing

Build and Deploy To Staging Environment

This and other AsciiDoc sources are compiled into a static site by using Antora and published at docs.threatx.com/txprevent by manually dispatching the Publish Workflow in ThreatX/docs.threatx.com.

The site will be staged to docs-staging.threatx.com automatically.

Deploy to Production Environment

Approval is required to deploy into the production environment. Anyone in the threatx-documentation group can approve production deployments.

Versioning

Component versions are structured as X.Y where X is the product major version and Y is the product minor version.

A directory containing an antora.yml file will be treated as a documentation components. (docs/antora.yml in this project). The component name and component version are defined here.

The image below shows the component version selector on docs.threatx.com:

Component Versions on docs.threatx.com

Branch Naming

A branch exists for each component version, named after said version. This is for organizational purposes and is not considered by the site generator.

Create a New Component Version

  1. Create a branch from the previous component version. For example, to create version 1.1, create a branch from the 1.0 branch.

  2. Update the version field in docs/antora.yml to the new version, e.g. version: 1.1

  3. Commit the change and push to remote.

Shared Custom Attributes

Use the antora.yml to define AsciiDoc attributes you want all documents to inherit:

  • Product Name

  • Product Version

  • Other software package versions

  • URLs

Command-Line Tooling

Linters

The package.json provides linters ( yamllint for YAML and vale for AsciiDoc source files) and NPM scripts for use.

Yaml-lint is used to check for correct syntax in the antora.yml file.

Vale checks things like spelling, readability and style guide compliance. It is configured with the .vale.ini file.

Install Dependencies

Yaml-lint will be installed on the first run npm i.

Vale requires styles to be downloaded. To install vale styles:

`npm run sync-styles`.

Usage

NPM scripts are provided for each of the main targets for linting: docs/antora.yml and all AsciiDoc (*.adoc) files under (docs/).

To lint the antora.yml:

`npm run check-yaml`.

To lint all AsciiDoc files:

`npm run check-style`

Copyright © 2024-present by ThreatX Inc. and the individual contributors to Antora.

See LICENSE to find the full license text.