docs: VitePress documentation site#157
Draft
ottobolyos wants to merge 1 commit intoTrakHound:masterfrom
Draft
Conversation
… 19 P0) Stand up a VitePress site rooted at the existing top-level docs/ directory, enable the vitepress-plugin-mermaid plugin so every architecture / sequence / class-relationship / state-machine / wire-flow diagram is authored in Mermaid (no ASCII art, no external image renders for schematic content), and absorb the existing hand-written .md pages into the new section structure. The site documents two 100% targets: - 100% MTConnect Standard compliance — per-version compliance matrix, wire-format compliance, spec-source-vs-implementation cross-references, known-divergences-from-the-Standard pointers, compliance-test-harness walkthrough. - 100% public-surface API coverage — every public class, interface, method, property, event, enum has an auto-generated page (P1 of the plan; this commit is P0 bootstrap only). Section structure (each section gets a stub index.md at P0; narrative content lands in P3+): - Compliance — MTConnect Standard compliance posture. - Configure & Use — install, configure agent / adapter, run, connect a consumer, operate. End-to-end how-to. - Concepts — Devices / Components / DataItems / Observations / Assets. - API reference — auto-generated API pages (P1). - Wire formats — XML, JSON v1, JSON-CPPAGENT v2, JSON-CPPAGENT-MQTT, SHDR. - Cookbook — recipes for common problems. - Troubleshooting — common errors + fixes. Existing docs/*.md pages absorbed into the site: - docs/InfluxDB.md → docs/configure/integrations/influxdb.md - docs/MQTT-*.md → docs/configure/integrations/mqtt-*.md - docs/OpenSSL.md → docs/configure/integrations/openssl.md - docs/Json.md → docs/wire-formats/json-v1.md - img/ → docs/img/ (image references rewritten to absolute /img/* paths from the site root). These pages are rewritten in scope (per the documentation plan) to align with the new site's voice + the current library/spec versions; the rewrites land in P3 after auto-generated API docs are in place. The VitePress build (`npm run docs:build`) currently produces a static bundle in `docs/.vitepress/dist/` (gitignored); `npm run docs:dev` serves the site locally with live reload. Plan: extra-files.user/plans/19-vitepress-docs/00-overview.md (gitignored, internal). Lands as a single PR after every currently-open per-issue PR (TrakHound#139–TrakHound#155) merges upstream so the auto-generated API docs run against the post-landing public surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stand up a VitePress documentation site rooted at the existing top-level
docs/directory, with Mermaid diagrams enabled for every architecture / sequence / class-relationship / state-machine / wire-flow diagram. The site documents everything in the repository — every shipped library and module, every CLI tool, every test category and dev workflow, every wire format and codec, every configuration knob, every API surface, every spec-version difference and compliance posture. Anything that lives in the source tree is on the docs site; anything that doesn't ship is not.Site layout
The site is rooted at the existing
docs/directory — nodocs/site/subdirectory. Top-level navigation:MinimumVersion/MaximumVersion).A "Testing & dev workflow" section covers
tools/test.sh,tools/dotnet.sh, the compliance harness layers, and the per-version compliance matrices that already live underdocs/testing/.API stability — semver guarantees, deprecation policies — is documented per type / member where the source code already carries an
[Obsolete]attribute, an XML<remarks>note, or aMaximumVersionattribute. The docs surface what the source declares.Phase map
This PR delivers P0 — site bootstrap. Subsequent phases land in follow-up commits on this branch.
P0 — site bootstrap (this commit)
package.jsonat the repo root —"type": "module", scriptsdocs:dev/docs:build/docs:preview. Dev-deps:vitepress,mermaid,vitepress-plugin-mermaid.docs/.vitepress/config.ts— site config: title, description, top nav, per-section sidebars, Mermaid plugin enabled via thewithMermaid(...)wrapper, local search, GitHub social link, footer.cleanUrls: true,lang: 'en-GB',ignoreDeadLinks: truewhile stub pages reference future-phase pages.docs/index.md— landing page (layout: home) with hero, six feature cards, and a Mermaid architecture-at-a-glance flowchart.index.mdpages for Compliance, Configure & Use, Concepts, API, Wire formats, Cookbook, Troubleshooting.docs/getting-started.mdstub.docs/README.md— local-run instructions..gitignoreupdated fornode_modules/,docs/.vitepress/cache/,docs/.vitepress/dist/.docs/*.mdpages absorbed intodocs/configure/integrations/anddocs/wire-formats/.img/directory moved todocs/img/; image references rewritten to absolute/img/*paths from the site root.docs/index.html(1-byte placeholder) removed.P1 — auto-generated API reference
XML triple-slash → markdown pipeline that walks every shipped
*.csprojunderlibraries/andagent/, extracts thebin/Release/<TFM>/<Lib>.xmldoc files emitted bydotnet build -c Release, and produces one markdown page per public type atdocs/api/<namespace-slug>/<TypeName>.md. Each page covers type signature, every public member, parameter / return / exception docs, and at least one usage example.P2 — spec-version badges
Each API page gets an "Introduced in" badge sourced from the type's
MinimumVersionattribute and (when set) a "Deprecated in" badge fromMaximumVersion. A spec-compatibility mini-matrix shows which v1.x / v2.x versions the type appears in.P3 — narrative docs
Hand-written companion pages for Getting Started, Concepts (with Mermaid class-relationship + sequence diagrams), Compliance, Configure & Use, Wire formats, Cookbook, Migration guides, Troubleshooting. Existing absorbed integration pages (
docs/configure/integrations/influxdb.md, the MQTT broker pages,docs/configure/integrations/openssl.md) are rewritten in this phase to align voice + reflect current library / spec versions, with Mermaid replacing any ASCII diagrams.P4 — CLI tool reference
For each shipped CLI (
agent,adapter,module-host,MTConnect.NET-SysML-Import): help-text reference, example invocation, configuration-file knob list with defaults + permissible values.P5 — Module catalog
Per shipped agent module (
HTTP,MQTT,MqttRelay,MqttAdapter,MqttBroker, etc.): setup, configuration knobs, wire interaction.P6 — Wire-format reference
Per format (XML, JSON v1, JSON-CPPAGENT v2, JSON-CPPAGENT-MQTT, SHDR): sample envelope, codec class name (linked to the API reference), spec-version compatibility, wire-flow Mermaid sequence diagram.
P7 — Workflow / how-to guides
Each workflow row in
docs/testing/workflows.mdgets a corresponding how-to that walks the user through performing it against a real local agent.P8 — CI build + deploy
.github/workflows/docs.ymlbuilds the VitePress site on every push tomasterand deploys to GitHub Pages. A PR check builds the site without deploying so doc-breaking changes surface in review.P9 — Cross-link sweep
Walk every page; verify every internal link resolves. Spot-check external links for liveness.
P10 — README link
The repo's top-level
README.mdadds a Documentation section linking to the deployed site.Verification
npm install npm run docs:build npm run docs:dev # serves at http://localhost:5173docs/index.mdrenders the Mermaid architecture flowchart; the seven stub section index pages and the absorbed integration pages are reachable through the new nav.Out of scope for this branch