{"id":29024468,"url":"https://github.com/numasi/htmx-jsx-template","last_synced_at":"2026-04-30T11:37:20.038Z","repository":{"id":293511941,"uuid":"984281238","full_name":"numasi/htmx-jsx-template","owner":"numasi","description":"HTMX extension for rendering (precompiled) JSX templates for a JSON response","archived":false,"fork":false,"pushed_at":"2025-05-24T21:25:31.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T11:36:42.169Z","etag":null,"topics":["bun","htmx","htmx-extension","htmx-template","jsx","jsx-templates","kitajs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numasi.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}},"created_at":"2025-05-15T17:14:50.000Z","updated_at":"2025-05-24T21:27:56.000Z","dependencies_parsed_at":"2025-06-26T04:02:08.773Z","dependency_job_id":"c3b21565-95f0-49df-bf4a-b759ce5bb0b6","html_url":"https://github.com/numasi/htmx-jsx-template","commit_stats":null,"previous_names":["numasi/htmx-jsx-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/numasi/htmx-jsx-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numasi%2Fhtmx-jsx-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numasi%2Fhtmx-jsx-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numasi%2Fhtmx-jsx-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numasi%2Fhtmx-jsx-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numasi","download_url":"https://codeload.github.com/numasi/htmx-jsx-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numasi%2Fhtmx-jsx-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32463892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bun","htmx","htmx-extension","htmx-template","jsx","jsx-templates","kitajs"],"created_at":"2025-06-26T04:01:57.071Z","updated_at":"2026-04-30T11:37:15.029Z","avatar_url":"https://github.com/numasi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### HTMX extension for rendering (preprocessed) JSX templates from JSON responses\n\n## Use\n\nFirst you need your JSX components transpiled and bundled at `dist/templates.js`. Check out my example repo on how to get it done [here](https://github.com/numasi/htmx-jsx-json-example/)\n\nUsing it by side with [htmx-json-attribute](htps://github.com/numasi/htmx-json-attribute), one can do this:\n\n\n```\n\u003cmeta name='htmx-config' content='{\"selfRequestsOnly\":false}'\u003e\n\u003cscript src='https://unpkg.com/htmx.org@2.0.4'\u003e\u003c/script\u003e\n\u003cscript src='json-attribute.js'\u003e\u003c/script\u003e\n\u003cscript src='jsx-template.js'\u003e\u003c/script\u003e\n\u003cdiv\n  hx-post='https://api.hive.blog'\n  hx-trigger='load'\n  hx-swap='outerHTML'\n  hx-target='div'\n  hx-ext='json-attr, jsx-template'\n  hx-json='{\n    \"jsonrpc\": \"2.0\",\n    \"method\": \"condenser_api.get_blog_entries\",\n    \"params\": [\"numasi\", 0, 10],\n    \"id\": 1\n  }'\n  hx-template='BlogEntries'\n\u003e\u003c/div\u003e\n```\n\n## How it works\n\nIt depends on JSX components transpiled with kita-js HTML string generation funcition in place of React's classic createElement. The extension looks for this bundle at file `dist/template.js`, importing all the components from there upon initaliazation, and serve them upon a response by matching component function name to `hx-template` attribute (defined by the extension), passing the parsed JSON response as parameter.\n\n## TODO\n\n- Option to change template directory\n- More build options (using ESBuild for auto-aggregation)\n- Experimenting with on-the-fly (client-side) transpile\n- Dynamic template imports (on need)\n- Error handling\n- Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumasi%2Fhtmx-jsx-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumasi%2Fhtmx-jsx-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumasi%2Fhtmx-jsx-template/lists"}