{"id":15097685,"url":"https://github.com/sombriks/koa-webc","last_synced_at":"2026-01-06T18:04:46.620Z","repository":{"id":146514849,"uuid":"615844579","full_name":"sombriks/koa-webc","owner":"sombriks","description":"koa middleware to render WebC views","archived":false,"fork":false,"pushed_at":"2023-09-02T12:31:52.000Z","size":233,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T17:44:27.957Z","etag":null,"topics":["koa","webc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sombriks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["sombriks"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-03-18T20:56:38.000Z","updated_at":"2024-10-01T14:24:31.000Z","dependencies_parsed_at":"2024-10-15T17:40:44.850Z","dependency_job_id":null,"html_url":"https://github.com/sombriks/koa-webc","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"ea346ecb312aa5fcb940b9aa90bbdb1a866e273d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fkoa-webc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fkoa-webc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fkoa-webc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sombriks%2Fkoa-webc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sombriks","download_url":"https://codeload.github.com/sombriks/koa-webc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245853811,"owners_count":20683253,"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":["koa","webc"],"created_at":"2024-09-25T16:24:50.608Z","updated_at":"2026-01-06T18:04:46.614Z","avatar_url":"https://github.com/sombriks.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sombriks"],"categories":[],"sub_categories":[],"readme":"# The KoaWebC plugin\n\n[![build status](https://github.com/sombriks/koa-webc/actions/workflows/node.js.yml/badge.svg)](https://github.com/sombriks/koa-webc)\n[![npm version](https://img.shields.io/npm/v/koa-webc?style=plastic)](https://www.npmjs.com/package/koa-webc)\n\nThis plugin enables [Koa](https://koajs.com/) to serve\n[WebC](https://github.com/11ty/webc)\n[pages](https://11ty.rocks/posts/introduction-webc/).\n\n## Installing\n\n```bash\nnpm i koa-webc\n```\n\n## Basic usage\n\n```js\nimport Koa from \"koa\"\nimport { KoaWebC } from \"koa-webc\"\n\nconst app = new Koa()\napp.use(KoaWebC())\n\napp.use(async ctx =\u003e ctx.render(\"hello-world.webc\"))\n\napp.listen(3000)\nconsole.log(\"http://localhost:3000\")\n```\n\n## Using with other middlewares\n\n```js\nconst app = new Koa()\nconst router = new Router()\n\nrouter.get(\"/the-extras\", async ctx =\u003e {\n  // override data options\n  await ctx.render(\"the-extras.webc\", {data: {bar: 'baz', xpto: \"xpto\"}})\n})\n\n// middleware registration order is important\napp\n  .use(KoaWebC({\n    bundle: true,\n    viewPath: path.join(process.cwd(), \"test\", \"fixtures\"),\n    data: {\n      foo: \"foo\",\n      bar: \"bar\"\n    }\n  }))\n  .use(router.routes())\n  .use(router.allowedMethods())\n  .listen(3000)\nconsole.log(\"http://localhost:3000\")\n```\n\nSee more [examples](https://github.com/sombriks/koa-webc-examples)\n\n## Roadmap\n\n- [X] initial support\n- [X] npm package publishing\n- [X] dedicated example project with snippets\n- [X] check interaction with other middlewares\n- [X] [documentation](index.d.ts) once api gets stable\n- [ ] performance/benchmark tests\n- [ ] CI/CD to automatically publish on npm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Fkoa-webc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsombriks%2Fkoa-webc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsombriks%2Fkoa-webc/lists"}