{"id":24103496,"url":"https://github.com/herudi/hx-page","last_synced_at":"2026-05-06T19:08:03.896Z","repository":{"id":219230812,"uuid":"748008585","full_name":"herudi/hx-page","owner":"herudi","description":"Effortless Htmx in Deno.","archived":false,"fork":false,"pushed_at":"2024-01-29T09:11:26.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T19:57:06.618Z","etag":null,"topics":["deno","denodeploy","deploy","htmx","nextjs"],"latest_commit_sha":null,"homepage":"https://hxp.deno.dev","language":"TypeScript","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/herudi.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}},"created_at":"2024-01-25T04:33:32.000Z","updated_at":"2024-01-27T03:37:38.000Z","dependencies_parsed_at":"2024-01-29T10:44:49.031Z","dependency_job_id":null,"html_url":"https://github.com/herudi/hx-page","commit_stats":null,"previous_names":["herudi/hx-page"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herudi%2Fhx-page","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herudi%2Fhx-page/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herudi%2Fhx-page/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herudi%2Fhx-page/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herudi","download_url":"https://codeload.github.com/herudi/hx-page/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241070432,"owners_count":19904387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["deno","denodeploy","deploy","htmx","nextjs"],"created_at":"2025-01-10T19:57:09.876Z","updated_at":"2026-05-06T19:08:03.866Z","avatar_url":"https://github.com/herudi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HX-Page\n\nEffortless [Htmx](https://htmx.org) in [Deno](https://deno.com).\n\n## Features\n\n- NextJS Router like.\n- Helmet Support.\n- AsyncComponent support.\n- Middleware support : `ETag`, `cache-control`, `twind` and more.\n- Including Hooks : `useRequestEvent`, `useRouter`, `useBody` and more.\n\n## Starter\n\n```bash\ndeno run -Ar https://hxp.deno.dev my_app\n```\n\n```bash\ncd my_app\n\n// dev\ndeno task dev\n\n// prod\ndeno task start\n```\n\n## Code Snippet\n\n```tsx\n// pages/todo.tsx\n\nimport { FC, Helmet, hx, useBody } from \"hxp\";\n\ntype Todo = { text: string };\n\nconst addTodo = hx.post(async () =\u003e {\n  const todo = useBody\u003cTodo\u003e();\n\n  // example save todo to db.\n  await db.todo.save(todo);\n\n  return \u003cli\u003e{todo.text}\u003c/li\u003e;\n});\n\nconst Todo: FC = async () =\u003e {\n  // example load todos from db.\n  const todos = await db.todo.findAll();\n\n  return (\n    \u003c\u003e\n      \u003cHelmet\u003e\n        \u003ctitle\u003eTodo\u003c/title\u003e\n      \u003c/Helmet\u003e\n      \u003cform\n        hx-on--after-request=\"this.reset()\"\n        hx-swap=\"afterbegin\"\n        hx-post={addTodo}\n        hx-target=\"#todo\"\n      \u003e\n        \u003cinput name=\"text\" type=\"text\" /\u003e\n        \u003cbutton type=\"submit\"\u003eSubmit\u003c/button\u003e\n      \u003c/form\u003e\n      \u003cul id=\"todo\"\u003e\n        {todos.map((todo) =\u003e \u003cli\u003e{todo.text}\u003c/li\u003e)}\n      \u003c/ul\u003e\n    \u003c/\u003e\n  );\n};\n\nexport default Todo;\n```\n\n## Deploy\n\n```bash\n// generate page first\ndeno task pages\n\n// deploy\ndeployctl deploy --prod --project=my_app main.ts\n```\n\nmore =\u003e https://hxp.deno.dev\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherudi%2Fhx-page","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherudi%2Fhx-page","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherudi%2Fhx-page/lists"}