Skip to content
Open
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
4 changes: 4 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { privilegeSecure2603Redirects } from './src/config/redirects/privilegese
import { isIndexableSite } from './src/config/indexing.js';
import { identityRecovery31Redirects } from './src/config/redirects/identityrecovery-3.1.js';
import robotsTxtPlugin from './src/plugins/robotsTxt.js';
import llmsTxtPlugin from './src/plugins/llmsTxt.js';
import { docVariablesPreprocessor } from './src/config/docVariables.js';


Expand Down Expand Up @@ -204,6 +205,9 @@ const config = {
// Writes build/robots.txt: crawlable on docs.netwrix.com only
robotsTxtPlugin,

// Writes build/llms.txt: an index of each product's latest version for AI tools (docs.netwrix.com only)
llmsTxtPlugin,

// Google Analytics
[
'@docusaurus/plugin-google-gtag',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"quality:readability": "node scripts/quality/readability.mjs",
"quality:fix": "node scripts/quality/fix-loop.mjs",
"slack:sync": "node scripts/sync-team-slack-map.mjs",
"test:scripts": "bash scripts/test-slugify.sh && bash scripts/test-heading-skip.sh && bash scripts/test-md-extension-autofix.sh && node --test scripts/test-set-blob-metadata.mjs && node scripts/test-set-blob-metadata-integration.mjs && node --test scripts/claude/test-log-summary.mjs && node --test scripts/test-vale-local.mjs && node --test scripts/test-resolve-path-labels.mjs && node --test scripts/test-sync-team-slack-map.mjs && node --test scripts/test-preserve-content.mjs && node --test src/plugins/robotsTxt.test.mjs && node --test src/config/docVariables.test.mjs && node --test src/config/products.test.mjs && node scripts/quality/gen-lint-digest.mjs --check",
"test:scripts": "bash scripts/test-slugify.sh && bash scripts/test-heading-skip.sh && bash scripts/test-md-extension-autofix.sh && node --test scripts/test-set-blob-metadata.mjs && node scripts/test-set-blob-metadata-integration.mjs && node --test scripts/claude/test-log-summary.mjs && node --test scripts/test-vale-local.mjs && node --test scripts/test-resolve-path-labels.mjs && node --test scripts/test-sync-team-slack-map.mjs && node --test scripts/test-preserve-content.mjs && node --test src/plugins/robotsTxt.test.mjs && node --test src/plugins/llmsTxt.test.mjs && node --test src/config/docVariables.test.mjs && node --test src/config/products.test.mjs && node scripts/quality/gen-lint-digest.mjs --check",
"prepare": "node scripts/hooks/install.mjs"
},
"dependencies": {
Expand Down
38 changes: 19 additions & 19 deletions src/config/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ALL_PRODUCTS = [
{
id: '1secure',
name: '1Secure',
description: 'Cloud-based security monitoring and compliance',
description: 'SaaS application that collects data from on-premises and cloud environments and reports on changes such as account and group membership changes',
path: 'docs/1secure',
categories: ['Data Security Posture Management (DSPM)'],
icon: '',
Expand Down Expand Up @@ -83,7 +83,7 @@ const ALL_PRODUCTS = [
{
id: 'accessanalyzer',
name: 'Access Analyzer',
description: 'Analyze and audit file system permissions',
description: 'Automate collection and analysis of data across files, directories, and other critical IT assets to audit access and permissions (formerly Enterprise Auditor)',
path: 'docs/accessanalyzer',
categories: ['Data Security Posture Management (DSPM)', 'Identity Threat Detection & Response (ITDR)'],
icon: '',
Expand Down Expand Up @@ -113,7 +113,7 @@ const ALL_PRODUCTS = [
{
id: 'accessinformationcenter',
name: 'Access Information Center',
description: 'Centralized access information management',
description: 'Web application for self-service access requests, resource ownership, access reviews, and resource audit reports built on Access Analyzer data',
path: 'docs/accessinformationcenter',
categories: ['Other'],
icon: '',
Expand All @@ -136,7 +136,7 @@ const ALL_PRODUCTS = [
{
id: 'activitymonitor',
name: 'Activity Monitor',
description: 'Track user activities across IT infrastructure',
description: 'Deploy agents that monitor activity in real time and send event data to other Netwrix products for reporting and alerting',
path: 'docs/activitymonitor',
categories: ['Other'],
icon: '',
Expand Down Expand Up @@ -177,7 +177,7 @@ const ALL_PRODUCTS = [
{
id: 'auditor',
name: 'Auditor',
description: 'Comprehensive IT infrastructure auditing',
description: 'Visibility platform for user behavior analysis and risk mitigation across changes, configurations, and access in hybrid IT environments',
path: 'docs/auditor',
categories: ['Directory Management', 'Data Security Posture Management (DSPM)'],
icon: '',
Expand Down Expand Up @@ -223,7 +223,7 @@ const ALL_PRODUCTS = [
{
id: 'customer',
name: 'Customer Portal & Training Guide',
description: 'Access custsomer resources and training materials',
description: 'Access customer resources and training materials',
path: 'docs/customer',
categories: ['Other'],
icon: '',
Expand All @@ -239,7 +239,7 @@ const ALL_PRODUCTS = [
{
id: 'dataclassification',
name: 'Data Classification',
description: 'Classify and protect sensitive data',
description: 'Identify and classify important and sensitive data across enterprise content to reduce risk',
path: 'docs/dataclassification',
categories: ['Data Security Posture Management (DSPM)'],
icon: '🏷️',
Expand Down Expand Up @@ -268,7 +268,7 @@ const ALL_PRODUCTS = [
{
id: 'directorymanager',
name: 'Directory Manager',
description: 'Active Directory group management',
description: 'Automate group, user, and password management in Active Directory and Microsoft Entra ID',
path: 'docs/directorymanager',
categories: ['Identity Management', 'Directory Management'],
icon: '',
Expand Down Expand Up @@ -297,7 +297,7 @@ const ALL_PRODUCTS = [
{
id: 'policypak',
name: 'PolicyPak',
description: 'Group Policy management and enforcement',
description: 'Endpoint management software that secures end users and enforces policy on desktops and laptops',
path: 'docs/policypak',
categories: ['Endpoint Management'],
icon: '',
Expand All @@ -313,7 +313,7 @@ const ALL_PRODUCTS = [
{
id: 'endpointprotector',
name: 'Endpoint Protector',
description: 'Comprehensive endpoint security',
description: 'Data loss prevention for endpoints: device control, content-aware protection, eDiscovery, and enforced encryption',
path: 'docs/endpointprotector',
categories: ['Endpoint Management'],
icon: '',
Expand All @@ -330,7 +330,7 @@ const ALL_PRODUCTS = [
{
id: 'identitymanager',
name: 'Identity Manager',
description: 'User provisioning and management',
description: 'Identity governance and administration (IGA): manage identities, assign entitlements across systems, and check that assignments keep complying with policy (formerly Usercube)',
path: 'docs/identitymanager',
categories: ['Identity Management'],
icon: '',
Expand Down Expand Up @@ -453,7 +453,7 @@ const ALL_PRODUCTS = [
{
id: 'passwordsecure',
name: 'Password Secure',
description: 'Secure password management',
description: 'Enterprise password manager for passwords and other security-relevant data such as documents and certificates',
path: 'docs/passwordsecure',
categories: ['Identity Management'],
icon: '',
Expand Down Expand Up @@ -570,7 +570,7 @@ const ALL_PRODUCTS = [
{
id: 'platgovnetsuite',
name: 'Strongpoint for NetSuite',
description: 'NetSuite governance and compliance',
description: 'NetSuite SuiteApp that catalogs customizations, tracks changes, and keeps documentation up to date automatically',
path: 'docs/platgovnetsuite',
categories: ['Identity Management'],
icon: '',
Expand Down Expand Up @@ -602,7 +602,7 @@ const ALL_PRODUCTS = [
{
id: 'platgovsalesforce',
name: 'Strongpoint for Salesforce',
description: 'Salesforce governance and compliance',
description: 'Catalogs Salesforce customizations, tracks changes, and keeps documentation up to date automatically',
path: 'docs/platgovsalesforce',
categories: ['Identity Management'],
icon: '',
Expand Down Expand Up @@ -634,7 +634,7 @@ const ALL_PRODUCTS = [
{
id: 'privilegesecure',
name: 'Privilege Secure',
description: 'Privileged access management',
description: 'Just-in-time, just-enough privileged access for administrators and help desk staff, without standing privileged accounts',
path: 'docs/privilegesecure',
categories: ['Privileged Access Management (PAM)'],
icon: '',
Expand Down Expand Up @@ -664,7 +664,7 @@ const ALL_PRODUCTS = [
{
id: 'privilegesecurediscovery',
name: 'Privilege Secure for Discovery',
description: 'Privileged access management',
description: 'Discover privileged accounts on Windows and Linux systems and grant just-in-time access (formerly Remediant SecureONE)',
path: 'docs/privilegesecurediscovery',
categories: ['Privileged Access Management (PAM)'],
icon: '',
Expand Down Expand Up @@ -706,7 +706,7 @@ const ALL_PRODUCTS = [
{
id: 'identityrecovery',
name: 'Identity Recovery',
description: 'Identity backup and recovery',
description: 'Roll back and recover Active Directory objects, attributes, domain controllers, or whole forests to a known good state',
path: 'docs/identityrecovery',
categories: ['Identity Threat Detection & Response (ITDR)'],
icon: '',
Expand All @@ -730,7 +730,7 @@ const ALL_PRODUCTS = [
{
id: 'threatmanager',
name: 'Threat Manager',
description: 'Advanced threat detection and response',
description: 'Detect and respond to abnormal behavior and advanced attacks against Active Directory and file systems',
path: 'docs/threatmanager',
categories: ['Identity Threat Detection & Response (ITDR)'],
icon: '',
Expand Down Expand Up @@ -765,7 +765,7 @@ const ALL_PRODUCTS = [
{
id: 'threatprevention',
name: 'Threat Prevention',
description: 'Proactive threat prevention',
description: 'Real-time protective layer around Active Directory, Exchange, and file systems that blocks risky activity',
path: 'docs/threatprevention',
categories: ['Identity Threat Detection & Response (ITDR)'],
icon: '',
Expand Down
57 changes: 57 additions & 0 deletions src/plugins/llmsTxt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { writeFileSync } from 'fs';
import { join } from 'path';
import { isIndexableSite } from '../config/indexing.js';
import { PRODUCTS, getDefaultVersion, generateRouteBasePath } from '../config/products.js';

const SITE_NAME = 'Netwrix Documentation';
const SITE_SUMMARY =
'Product documentation for Netwrix security products. Each link below goes to the latest version of a product. Other versions are listed in the version selector on each product page.';

/** Route of a product's latest version, for example /docs/accessanalyzer/12_0. */
export function latestRoute(product) {
const latest = getDefaultVersion(product);
if (!latest) return null;
return `/${latest.customRoutePath || generateRouteBasePath(product.path, latest.version)}`;
}

/**
* Builds the llms.txt body (llmstxt.org format): one link per product to its latest
* version, plus the Knowledge Base. Unlisted products (noIndex or hideFromNavbar) are left out.
* Uses the full product list, not the DOCS_PRODUCT-scoped one, like robots.txt.
*/
export function buildLlmsTxt(siteUrl, products = PRODUCTS) {
const origin = new URL(siteUrl).origin;
const lines = products
.filter((product) => !product.noIndex && !product.hideFromNavbar && latestRoute(product))
.sort((a, b) => a.name.localeCompare(b.name, 'en'))
.map((product) => {
const description = product.description ? `: ${product.description}` : '';
return `- [${product.name}](${origin}${latestRoute(product)})${description}`;
});

return [
`# ${SITE_NAME}`,
'',
`> ${SITE_SUMMARY}`,
'',
'## Products',
'',
...lines,
'',
'## Optional',
'',
`- [Knowledge Base](${origin}/docs/kb/): Troubleshooting and how-to articles across products`,
'',
].join('\n');
}

/** Writes build/llms.txt on docs.netwrix.com only, the same host robots.txt leaves open. */
export default function llmsTxtPlugin() {
return {
name: 'llms-txt',
async postBuild({ siteConfig, outDir }) {
if (!isIndexableSite(siteConfig.url)) return;
writeFileSync(join(outDir, 'llms.txt'), buildLlmsTxt(siteConfig.url));
},
};
}
51 changes: 51 additions & 0 deletions src/plugins/llmsTxt.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import assert from 'node:assert/strict';
import { test } from 'node:test';
import { buildLlmsTxt, latestRoute } from './llmsTxt.js';

const products = [
{
id: 'zeta',
name: 'Zeta',
description: 'Single-version product',
path: 'docs/zeta',
versions: [{ version: 'current', isLatest: true }],
},
{
id: 'alpha',
name: 'Alpha',
description: 'Multi-version product',
path: 'docs/alpha',
versions: [
{ version: '2.0', isLatest: false },
{ version: '3.1', isLatest: true },
],
},
{ id: 'custom', name: 'Custom', path: 'docs/custom', versions: [{ version: 'current', isLatest: true, customRoutePath: 'docs/custom/current' }] },
{ id: 'old', name: 'Old', path: 'docs/old', hideFromNavbar: true, versions: [{ version: 'current', isLatest: true }] },
{ id: 'pinned', name: 'Pinned', path: 'docs/pinned', defaultVersion: '1.0', versions: [{ version: '1.0' }, { version: '2.0', isLatest: true }] },
{ id: 'broken', name: 'Broken', path: 'docs/broken', defaultVersion: '9.9', versions: [{ version: '1.0', isLatest: true }] },
{ id: 'beta', name: 'Beta', path: 'docs/beta', noIndex: true, versions: [{ version: 'current', isLatest: true }] },
];

test('latestRoute uses the latest version, converting dots to underscores', () => {
assert.equal(latestRoute(products[1]), '/docs/alpha/3_1');
assert.equal(latestRoute(products[0]), '/docs/zeta');
assert.equal(latestRoute(products[2]), '/docs/custom/current');
});

test('defaultVersion wins over isLatest, and a bad defaultVersion is skipped, not thrown', () => {
assert.equal(latestRoute(products.find((p) => p.id === 'pinned')), '/docs/pinned/1_0');
assert.equal(latestRoute(products.find((p) => p.id === 'broken')), null);
});

test('llms.txt lists products alphabetically, omits noIndex, and links the KB', () => {
const text = buildLlmsTxt('https://docs.netwrix.com', products);
assert.ok(text.startsWith('# Netwrix Documentation\n\n> '));
assert.ok(text.includes('- [Alpha](https://docs.netwrix.com/docs/alpha/3_1): Multi-version product\n'));
assert.ok(text.includes('- [Custom](https://docs.netwrix.com/docs/custom/current)\n'));
assert.ok(text.indexOf('[Alpha]') < text.indexOf('[Zeta]'));
assert.ok(!text.includes('Beta'));
assert.ok(!text.includes('[Old]'));
assert.ok(!text.includes('[Broken]'));
assert.ok(text.includes('## Optional\n\n- [Knowledge Base](https://docs.netwrix.com/docs/kb/)'));
});
Loading