This is the dbatools.io Hugo static site. Key facts for agents working on the commands section.
All dbatools command metadata originates from the official module repository:
https://raw.githubusercontent.com/dataplat/dbatools/master/bin/dbatools-index.json
Fields include: CommandName, Description, Synopsis, Author,
Availability, Tags, Syntax, Examples, Params.
Run in order — or they run automatically via .github/workflows/deploy.yml in this
repo (dataplat/web) on every push to main or html.
dataplat/docs— the olddocs.dbatools.iosite. Has its own separate CI (update-assets.yml) triggered byrepository_dispatch. Generates plain HTML files directly; nothing indataplat/webdepends on it.dataplat/dataplat.github.io— stores cached asset files (build-ref, index) pulled daily from the dbatoolsdevelopmentbranch. Feeds the/buildspage. The commands pipeline here does not use this cache — it fetchesdbatools-index.jsondirectly fromdataplat/dbatoolsmasterat CI run time.
1. transform-dbatools-index.ps1 → static/commands.json (initial transform)
2. generate-command-pages.ps1 → content/commands/*.md (one file per command)
3. enrich-commands-json.ps1 → adds fullContent to static/commands.json
4. update-popular-commands.ps1 → applies rankings.txt popularity data
5. update-commands-urls.ps1 → normalises URL format to /{CommandName}
The Availability field from dbatools-index.json (e.g. "Windows, Linux,
macOS") is written into each command's YAML front matter as availability: by
generate-command-pages.ps1. The template at
themes/dbatools2025/layouts/commands/single.html renders it as a platform
badge. Do not try to derive this from command names — it comes from the
dbatools module source.
/commandslisting: data fromstatic/commands.jsonviastatic/js/commands-page.jsusing Fuse.js for fuzzy search- Individual
/{CommandName}pages: Hugo renderscontent/commands/*.mdusingthemes/dbatools2025/layouts/commands/single.html - The sidebar on individual pages also loads
commands.jsonto render the command navigation list
| Field | Type | Source |
|---|---|---|
name |
string | CommandName from index |
description |
string | Description from index |
synopsis |
string | Synopsis from index |
category |
string | Derived by transform script (verb > tags > noun) |
tags |
string[] | Tags from index, lowercased |
verb |
string | First word of command name (Add, Get, Set, …) |
popular |
bool | Top 50 by page views (rankings.txt) |
popularityRank |
int | Rank 1–680 from rankings.txt; 0 if unranked |
url |
string | /{CommandName} |
fullContent |
string | Plain-text dump of the markdown file for Fuse.js |
- Verb:
Copy/Export→ Migration;Backup/Restore→ Backup & Restore - Tags:
agent→ Agent & Jobs;certificate/login/etc → Security;backup→ Backup & Restore - Noun patterns:
Cpu/Memory/Wait/etc → Performance;Ag*/Replica/etc → Advanced Features - Default fallback → Utilities
- Edit
static/commands.jsonmanually; re-run the pipeline. - Create
layouts/page/command-detail.htmlorstatic/css/command-detail.css(unused, causes confusion). - Assume the individual command layout is
layouts/_default/single.html; it islayouts/commands/single.html.
scripts/README.md— full pipeline docsCOMMAND_PAGES_README.md— layout files, CSS files, and editing guidecommands-page-build-spec_2.md— original design spec for the commands page