{"id":40310050,"url":"https://github.com/phetsims/binder","last_synced_at":"2026-01-20T06:31:47.032Z","repository":{"id":47477143,"uuid":"132821084","full_name":"phetsims/binder","owner":"phetsims","description":"Generates and publishes documentation for PhET simulation components.","archived":false,"fork":false,"pushed_at":"2026-01-10T12:38:45.000Z","size":1230538,"stargazers_count":0,"open_issues_count":15,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-11T03:54:34.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phetsims.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-05-09T22:56:19.000Z","updated_at":"2026-01-10T12:38:52.000Z","dependencies_parsed_at":"2025-07-12T12:17:39.678Z","dependency_job_id":"e11adf09-dac6-45dc-a070-46ef8aa441f3","html_url":"https://github.com/phetsims/binder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phetsims/binder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Fbinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Fbinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Fbinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Fbinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phetsims","download_url":"https://codeload.github.com/phetsims/binder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Fbinder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T06:31:46.868Z","updated_at":"2026-01-20T06:31:47.020Z","avatar_url":"https://github.com/phetsims.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# binder\n\nSee [https://phetsims.github.io/binder/](https://phetsims.github.io/binder/) for public up to date documentation and\nstyle guide on PhET sim components.\n\nGenerates and publishes documentation for PhET simulation components. Included components are registered to\nan `instanceRegistry` that's created as a result of a `binder` query parameter. It uses `puppeteer` to manage a Chromium\ninstance to grab the images of the registered components from the specified sims. We then stitch those images with\ncontent from `doc` directories in sun/, scenery-phet/, and scenery/ (the latter two are forthcoming) and produce HTML in\nthe `doc` directory that houses the `gh-pages` branch. The page is hosted from [Github Pages](https://pages.github.com/)\nfrom that branch.\n\n## generation\n\nTo generate the component images and pull the appropriate :\n\n    `npm run build`\n\nTo generate docs with only specific simulation examples, add them as an argument, comma separated:\n\n    `npm run build -- ohms-law,wave-on-a-string`\n\nThe generated docs load sim to gather runtime information. To bypass this step and use stored data from sim loads:\n\n    `npm run build-html`\n\nNOTE: This will only log out the html string, not write it to the output file. The above snippet will copy the output\ninto a file of your choosing.\n\nWe render markdown and insert it into `index.html` with the `handlebars` library. These templates can be found in\nthe `templates/` directory.\n\nFor more information see https://github.com/phetsims/binder/ or contact @zepumph.\n\n## output\n\nThis project is automatically run every night to regenerate the latest usages of PhET components, so just wait until \ntomorrow to see any changes (or manually update using the above steps).\n\n`/docs` from main is hosted at  https://phetsims.github.io/binder/. So checking in the build file will update the\nendpoint for all to see changes immediately. `docs/` is against phet convention of having a `doc/` folder, but github\nrequires the folder named as such to support hosting files from main. \n\n## Adding components\n\nTo add a new component here is a list of steps to take:\n1. Create a markdown file in the desired common code repo `doc/` directory, see [sun/doc/templates/MarkdownTemplate.md](https://github.com/phetsims/sun/blob/main/doc/templates/MarkDownTemplate.md) for example.\n2. Make sure to go to the parent category markdown file (likely just `sun/doc/OtherUI.md`) and add your component to that list.\n3. To retrieve sim usages of this component. Go to the constructor of your class and add a registration line that looks like: https://github.com/phetsims/sun/blob/11823335e60202b42e07e912b73635da5b0da677/js/Slider.ts#L517-L518 \n4. Binder is auto generated each night, so nothing more is needed to move your changes to production.\n\n## Hotkeys\n\nBinder also documents Hotkeys used in PhET simulations. Hotkeys are registered with scenery/HotkeyData, which also uses\nthe InstanceRegistry. The puppeteer script (getFromSimInMain.js) grabs the HotkeyData as its loads each sim.\n\n- See getFromSimInMain.js for the work that gets hotkey data by loading simulations.\n- See templates/hotkeys.html for the template used to render the hotkeys and the the filtering functionality.\n- See base.html for the link to the hotkeys page. The classes on the link are required for the page to work.\n- See createHTMLString.js for the work that uses the hotkeys.html template and fills it in from hotkeys data.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphetsims%2Fbinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphetsims%2Fbinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphetsims%2Fbinder/lists"}