Deploying as a Static Website
You can deploy your documentation portal as a static website.
Gramax CLI is used for generating static websites based on content created in Gramax.
Prerequisites
Node.js version 18 or higher (required for CLI).
A text editor, such as Visual Studio Code.
A terminal.
Quick Start
Install Gramax CLI:
npm install -g gramax-cli.Generate the static site:
gramax-cli build --source ./content --destination ./output.
Detailed Steps
Step 1: Install Gramax CLI
Gramax CLI can be used in two ways:
Without installation: Run commands using
npx:npx gramax-cli <command> [options].Global installation: For frequent use, install it globally:
npm install -g gramax-cli.
After installation, CLI commands are available from any directory.
Step 2. Generate the static site
To generate the site, run the following command: gramax-cli build [options].
Build options
Configure additional settings
You can configure additional site settings, including indexing, metrics collection, custom styles, and the catalog logo.
Use
gramax.config.yaml. Create a file in the content root, add the required settings:build: logo: imageUrl: "https://example.com/logo.png" # See "Portal logo" linkUrl: "https://example.com" metrics: # See "Portal Web Analytics" yandex: metricCounter: 12345678 matomo: matomoSiteId: 1 matomoUrl: "https://example.com/matomo" matomoContainerUrl: "https://example.com/container" ai: # See "AI Search on a Static Site" url: "https://ai.example.com" instance: "my-static-site" token: "myPrivateToken" publicToken: "myPublicToken" forceUiLangSync: true # Match the UI language to the content language features: # Enable experimental features - filtered-catalog # Filter the catalog by content - export-pdf # Use the new PDF exportUse environment variables.