{"id":24983717,"url":"https://github.com/posthtml/hapi-posthtml","last_synced_at":"2025-10-14T08:32:56.112Z","repository":{"id":57261027,"uuid":"53152999","full_name":"posthtml/hapi-posthtml","owner":"posthtml","description":"PostHTML for Hapi","archived":false,"fork":false,"pushed_at":"2016-08-01T22:28:25.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T21:06:03.267Z","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/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-04T17:26:32.000Z","updated_at":"2016-06-13T03:23:03.000Z","dependencies_parsed_at":"2022-08-31T12:23:06.982Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/hapi-posthtml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fhapi-posthtml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fhapi-posthtml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fhapi-posthtml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fhapi-posthtml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/hapi-posthtml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245462338,"owners_count":20619455,"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":[],"created_at":"2025-02-04T09:20:34.602Z","updated_at":"2025-10-14T08:32:51.078Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Tests][build]][build-url]\n[![Coverage][cover]][cover-url]\n[![Standard Code Style][style]][style-url]\n[![Chat][chat]][chat-badge]\n\n# Hapi PostHTML \u003cimg align=\"right\" width=\"200\" height=\"220\" title=\"PostHTML\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n## Install\n\n```bash\nnpm i -S hapi-posthtml\n```\n\n## Usage\n\n```js\nimport Hapi from 'hapi'\n\nimport vision from 'vision'\nimport posthtml from 'hapi-posthtml'\n\nconst server = new Hapi.Server()\n\n// Create server\nserver.connection({\n  host: 'localhost',\n  port: 3000\n})\n\n// Vision for view support\nserver.register(vision, err =\u003e {\n  if (err) {\n    throw err\n  }\n  // PostHTML\n  server.views({\n    path: 'public/views/',\n    engines: {\n      'html': posthtml\n    },\n    relativeTo: __dirname,\n    compileMode: 'async'\n    compileOptions: {\n      // PostHTML Plugins\n      plugins: [/* Plugins */]\n    }\n  })\n})\n\n// Create route handlers\nconst handlers = {\n  root: function (request, reply) {\n    reply.view('index')\n  },\n  local: function (request, reply) {\n    reply.view('index', { plugins: [/* Plugins */] })\n  },\n  extend: function (request, reply) {\n    reply.view('index', { plugins: [/* Plugins */], extend: true})\n  }\n}\n\n// Create routes\nserver.route({\n  method: 'GET',\n  path: '/',\n  handler: handlers.root\n})\n\nserver.route({\n  method: 'GET',\n  path: '/local',\n  handler: handlers.local\n})\n\nserver.route({\n  method: 'GET',\n  path: '/extend',\n  handler: handlers.extend\n})\n\nserver.start((err) =\u003e {\n  if (err) {\n    throw err\n  }\n  console.log('=\u003e Server:', server.info.uri)\n})\n```\n\n## Maintainers\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n   \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg width=\"150 height=\"150\"\n      src=\"https://avatars.githubusercontent.com/u/5419992?v=3\u0026s=150\"\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"https://github.com/michael-ciniawsky\"\u003eMichael Ciniawsky\u003c/a\u003e\n    \u003c/td\u003e\n   \u003c/tr\u003e\n  \u003ctbody\u003e\n\u003c/table\u003e\n\n## Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).\n\n## LICENSE\n\n[MIT](LICENSE)\n\n[npm]: https://img.shields.io/npm/v/hapi-posthtml.svg\n[npm-url]: https://npmjs.com/package/hapi-posthtml\n\n[deps]: https://david-dm.org/posthtml/hapi-posthtml.svg\n[deps-url]: https://david-dm.org/posthtml/hapi-posthtml\n\n[build]: http://img.shields.io/travis/posthtml/hapi-posthtml.svg\n[build-url]: https://travis-ci.org/posthtml/hapi-posthtml\n\n[cover]: https://coveralls.io/repos/github/posthtml/hapi-posthtml/badge.svg?branch=master\n[cover-url]: https://coveralls.io/github/posthtml/hapi-posthtml?branch=master\n\n[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[style-url]: http://standardjs.com/\n\n[chat]: https://badges.gitter.im/posthtml/posthtml.svg\n[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fhapi-posthtml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fhapi-posthtml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fhapi-posthtml/lists"}