Example Grasshopper models used throughout our documentation.
Please find a searchable overview of all example models here.
You can clone this repository to download all models at once.
This repository uses mdBook to auto-generate documentation based on Markdown. A GitHub action is used to deploy to GitHub pages.
The source of truth for example metadata is src/**/examples.json. Markdown tables in src/**/definitions.md are generated from these JSON files and should not be created or edited manually.
src/contains the mdBook content, example metadata, and model files.tools/contains repository tooling. In particular,tools/docs-cli/provides the scripts used to validateexamples.jsonfiles and generate markdown tables from them.
- Use the
ghxXML file format of Grasshopper. - Update
examples.jsonwhen changing example metadata. - Add only additional explanatory text manually to Markdown files.
- Do not manually create or edit generated markdown tables; they are generated via GitHub workflows.
-
npm run docs:validatevalidates allsrc/**/examples.jsonfiles and checks referenced files. -
npm run docs:create-tablesregenerates markdown tables fromsrc/**/examples.json. -
pnpm run docs:process-modelsprocesses changed Grasshopper models for ShapeDiver deployment.Required environment variables:
SHAPEDIVER_PLATFORM_USER_ID- The ShapeDiver user ID that has to own all example models.SHAPEDIVER_ACCESS_KEY_IDSHAPEDIVER_ACCESS_KEY_SECRETDEFAULT_BACKEND_SYSTEM_ALIAS— backend system alias used when creating a brand-new model without a previous ShapeDiver model
Optional environment variables:
SHAPEDIVER_PLATFORM_URL— defaults tohttps://app.shapediver.comGITHUB_SHA— defaults togit rev-parse HEADPROCESS_MODELS_CHAPTER— limits processing to a single chapter
-
mdbook serve .starts a local preview server for the documentation.
Take the following setup steps to locally test auto-generation of the documentation.
- Install rust
- Install mdBook
cargo install mdbook - Install mdbook-external-links
cargo install mdbook-external-links - From the root directory of this repository run
mdbook serve .
In normal workflows, markdown tables are generated through GitHub workflows and should not be created manually.