{"_id":"hof-govuk-template","_rev":"62-d0ade7c20cd4d014d6b34bed8221b4c1","name":"hof-govuk-template","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"hof-govuk-template","version":"1.0.0","author":"","license":"MIT","_id":"hof-govuk-template@1.0.0","maintainers":[{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-govuk-template","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-govuk-template/issues"},"dist":{"shasum":"18215fbf0080cee5dc71d80e44c95b04079a03e2","tarball":"https://registry.npmjs.org/hof-govuk-template/-/hof-govuk-template-1.0.0.tgz","integrity":"sha512-DhTmtv2LWACQpdbnuqcxa5sjrv6Ra6HjP5pYNzvIPc8m4/HHwKuqlddqXt6XksT3iq4x3ocgOHe4HXpCfayXTg==","signatures":[{"sig":"MEYCIQCDdIaj1xbUb5KTllEGeRjFwG52ZC8wwKRqGn4alcukXQIhAN2kn7vtoNdBinh21APIFu9zVBv+mvU8wk8jeMmrweAa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"18215fbf0080cee5dc71d80e44c95b04079a03e2","gitHead":"d24a2607a7cd548a733f3bdd27b375ece5a775d5","scripts":{"postinstall":"node ./build/index.js"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"DEPRECATED, hof-govuk-template is built into hof v19 <(^_^)> & should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-govuk-template.git","type":"git"},"_npmVersion":"3.10.8","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","directories":{},"_nodeVersion":"6.2.2","dependencies":{"hogan.js":"3.0.2","serve-static":"^1.10.3","govuk_template_mustache":"^0.17.3"},"_npmOperationalInternal":{"tmp":"tmp/hof-govuk-template-1.0.0.tgz_1479485894027_0.7557832594029605","host":"packages-12-west.internal.npmjs.com"}},"2.0.0":{"name":"hof-govuk-template","version":"2.0.0","author":"","license":"MIT","_id":"hof-govuk-template@2.0.0","maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-govuk-template","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-govuk-template/issues"},"dist":{"shasum":"a724759c600f3540cdaea19e95205ddbd5270dad","tarball":"https://registry.npmjs.org/hof-govuk-template/-/hof-govuk-template-2.0.0.tgz","integrity":"sha512-4my085ZQucFSF7/M8/ugoYs4BOc7+9mT8L0rML48baJRjRPBKB+vyIfx5Ib6QhkYfcoVdP+zHBuBc8KBc3nDpg==","signatures":[{"sig":"MEUCICmr66eX9zTxG2AUyh2jo1t8sgNRlekDVXUlanIQqSNdAiEA9qPlge5+/usE0rwLxZm/lVMubWFs+P4UD6qIuS/tIz4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"a724759c600f3540cdaea19e95205ddbd5270dad","gitHead":"e08fe8c5537c43bdb0a461ca47f287b24dc06d8c","scripts":{"lint":"eslint .","test":"npm run lint","prepublish":"node ./build/index.js"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"DEPRECATED, hof-govuk-template is built into hof v19 <(^_^)> & should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-govuk-template.git","type":"git"},"_npmVersion":"4.5.0","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","directories":{},"_nodeVersion":"6.9.4","dependencies":{"express":"^4.15.2","serve-static":"^1.10.3","govuk_template_mustache":"^0.17.3"},"devDependencies":{"eslint":"^3.19.0","hogan.js":"3.0.2","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-govuk-template-2.0.0.tgz_1492611629163_0.7313123431522399","host":"packages-12-west.internal.npmjs.com"}},"2.0.1":{"name":"hof-govuk-template","version":"2.0.1","author":"","license":"MIT","_id":"hof-govuk-template@2.0.1","maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-govuk-template","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-govuk-template/issues"},"dist":{"shasum":"ad940f912d8c8ff67096f2b1e1a97b767caabbab","tarball":"https://registry.npmjs.org/hof-govuk-template/-/hof-govuk-template-2.0.1.tgz","integrity":"sha512-agQGESuH0OUy4106LTzo76flrfzeW6/xXC2TL55EkBRraKB5siBza4NaU8Qn4EYgcJPTYkbhMo/EVbRtSra84Q==","signatures":[{"sig":"MEUCIEQfQqCZ1tkphXIJZPMmbzHU1hyxvsPdOYa3SCD4T8zGAiEAonsyfJJ7pXrKyGkYDx6ex1I36lDdX8IN/zkZZEfEndA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"ad940f912d8c8ff67096f2b1e1a97b767caabbab","gitHead":"0986d25700af2003398a359f208f8f555f12ebaf","scripts":{"lint":"eslint .","test":"npm run lint","prepublish":"node ./build/index.js"},"_npmUser":{"name":"lennym","email":"leonard.martin@gmail.com"},"deprecated":"DEPRECATED, hof-govuk-template is built into hof v19 <(^_^)> & should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-govuk-template.git","type":"git"},"_npmVersion":"4.5.0","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","directories":{},"_nodeVersion":"6.9.4","dependencies":{"express":"^4.15.2","serve-static":"^1.10.3","govuk_template_mustache":"^0.17.3"},"devDependencies":{"eslint":"^3.19.0","hogan.js":"3.0.2","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-govuk-template-2.0.1.tgz_1492612258338_0.7612928790040314","host":"packages-18-east.internal.npmjs.com"}},"2.1.0":{"name":"hof-govuk-template","version":"2.1.0","author":"","license":"MIT","_id":"hof-govuk-template@2.1.0","maintainers":[{"name":"robertdeniszczyc2","email":"Robert.deniszczyc@digital.homeoffice.gov.uk"},{"name":"aswann","email":"alex_swann@hotmail.co.uk"},{"name":"alexfranklin","email":"alex.franklin@digital.homeoffice.gov.uk"},{"name":"andrew.moody.ho","email":"andrew.moody@digital.homeoffice.gov.uk"},{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"},{"name":"coupey","email":"paul@coupey.co.uk"},{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"josephchapman","email":"joe@creatify.io"},{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-govuk-template","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-govuk-template/issues"},"dist":{"shasum":"7869cee2a2cb0ac900d490acbdce04cba0c55a09","tarball":"https://registry.npmjs.org/hof-govuk-template/-/hof-govuk-template-2.1.0.tgz","fileCount":13,"integrity":"sha512-B/vi6+Y+dCol3YPu7vOdjHH0ufPnUUrqDhSMbGBkTaKuyyomTmEEIMOmU9N9ekcqQjdDxFf/IwAFjltdryYxtg==","signatures":[{"sig":"MEYCIQC5FvK5SuFw9rSkL/iGNRbbd1y+Z4yk7Mb8kJv2gE602wIhAKsBoEVp8ad3GVNJ2XrjAuhZfqesHW+448aYzKPOuB5s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfx8PWCRA9TVsSAnZWagAAyW0P/RY9fV1UTTVo7TVKxbPN\nqjzh4T9U5Kx56p1ea+1BZDDPCQOriV9c4e2MZnL9xlZCwOzruNWljo7Ehs3o\nHlGAkRGKn/PtyiIWFI280UJWS+i7LUY5jSvhB+hTmvLdHVMzmmkjUAiAXh3M\nyanePnvA0eggiBiRAEtMnnLc3B5j3c6r8tWWWXRiK0BpBsDT0/6CtbrxjG/j\n+oWtUokrkCWaAUV72tsRbuRKDy19dNfewnKHVtuPpYLXMdcNmil0LtqLV9eH\nnKJjRj0unA6a5ZiKy6i3JHILEZ00dvxg1WqzKUdkMVkvsGJNKVN4AhCvIpej\nr8m2KpLkrEJsiJ+stKb99XbSD35dLz2GJawS/oz5V5kwAeMIQB+FGKauZwkK\n/N3/l3FA9X0fbf/0bCHCuwY/ZNhLu7DYAgg7NHMCpfY9HMKSExI65vuCbSu4\nPnh93X0rx8PaDhC3ZZSFCSbpfD0Qjp1KPZJHFfYHyI3wzNI5mSul+zgdahej\ngJSB6QrupPKf5xxzPzcgvK9hAQ3nhJpyoVPVT1HW1wF1lxkAVINBFCF239IM\nLcPhiJ0hnC6+Qie4ee/g+YItD6T4ejuUDpAdrH4MdtKtEZe41B6K3X4NFANb\nLEjePDoVZemrXNKc9zWRYptRhM98cklNY1nvN/6D+v311ZEmnml2lunapadh\n8+yZ\r\n=0UGF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"f9689e4d388eaa794c6edc3480b2fb1764c90e0d","scripts":{"lint":"eslint .","test":"npm run lint","prepublish":"node ./build/index.js"},"_npmUser":{"name":"alexfranklin","email":"alex.franklin@digital.homeoffice.gov.uk"},"deprecated":"DEPRECATED, hof-govuk-template is built into hof v19 <(^_^)> & should not be installed separately","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-govuk-template.git","type":"git"},"_npmVersion":"6.12.1","description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","directories":{},"_nodeVersion":"12.13.1","dependencies":{"express":"^4.15.2","serve-static":"^1.10.3","govuk_template_mustache":"^0.17.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^3.19.0","hogan.js":"3.0.2","eslint-config-homeoffice":"^2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/hof-govuk-template_2.1.0_1606927317763_0.6488950618955334","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-11-18T16:18:15.936Z","modified":"2026-09-21T15:12:49.789Z","1.0.0":"2016-11-18T16:18:15.936Z","2.0.0":"2017-04-19T14:20:31.210Z","2.0.1":"2017-04-19T14:30:58.926Z","2.1.0":"2020-12-02T16:41:57.956Z"},"bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-govuk-template/issues"},"license":"MIT","homepage":"https://github.com/UKHomeOfficeForms/hof-govuk-template","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-govuk-template.git","type":"git"},"description":"Compile govuk mustache template into a more usable format and provide middleware for use in apps","maintainers":[{"email":"aaron.russell@digital.homeoffice.gov.uk","name":"aaronrussellho"},{"email":"sas-hof-test@digital.homeoffice.gov.uk","name":"hof-bot-user"},{"email":"dk4g.blob@gmail.com","name":"dk4g"},{"email":"gregory.wolverson@digital.homeoffice.gov.uk","name":"greg_wolverson_ho"},{"email":"vinodha.samiyappan@digital.homeoffice.gov.uk","name":"vinodha.s"},{"email":"megan.john@digital.homeoffice.gov.uk","name":"meganjohn"},{"email":"nese.zorba@digital.homeoffice.gov.uk","name":"nzorba"},{"email":"rayhannur.rohman@digital.homeoffice.gov.uk","name":"rayhannurrohmanho"},{"email":"vivek.kumar1@digital.homeoffice.gov.uk","name":"vivekkumar-ho"},{"email":"ben@marvell-consulting.com","name":"easternbloc"},{"email":"joseph.chapman@creatify.io","name":"josephchapman"},{"email":"leonard.martin@gmail.com","name":"lennym"},{"email":"hello@joefitter.com","name":"joefitter"}],"readme":"# hof-govuk-template\n\nCompiles govuk mustache template into a more usable format and provide middleware for use in apps.\n\nExisting [govuk mustache template](https://www.npmjs.com/package/govuk_template_mustache) has simple mustache placeholders for content sections, which necessitates a two step compile process where sections are compiled individually and then again into the parent template.\n\nCompiling the template to replace these placeholders with variables allows for templates to implement the govuk template as a parent partial.\n\n## Example\n\n```\n{{< govuk-template}}\n\n    {{$main}}\n        <h1>Page Content</h1>\n    {{/main}}\n\n{{/ govuk-template}}\n```\n\n## Installation\n\n```\nnpm install [--save] hof-govuk-template\n```\n\n## Usage\n\nWhen used as part of an express app, a middleware is returned which will add a static fileserver (using [serve-static](https://www.npmjs.com/package/serve-static)) to serve the template assets without needing to copy them to any other location.\n\nIt will also add the template as a mustache partial with a name of \"govuk-template\".\n\n### To configure express middleware\n```\napp.use(require('hof-govuk-template')([options]);\n```\n\n### To use the mustache partial\n```\n{{< govuk-template}}\n    {{$pageTitle}}An example page{{/pageTitle}}\n    {{$main}}\n        <h1>Page Content</h1>\n    {{/main}}\n{{/ govuk-template}}\n```\n\n## Options\n\nA number of options can be passed with the app into the setup method:\n\n* `path` - Sets the base path for the location of static assets - Default: `/govuk-assets`\n\nOther options are passed onto the [serve-static](https://www.npmjs.com/package/serve-static) configuration, and more details can be found in [the serve-static documentation](https://www.npmjs.com/package/serve-static)\n\n# Nonce values\nVersion 18.0.0 and above of HOF provides and requires a nonce value for all inline javascript, as unsafe-inline is disabled.\nOlder versions (pre 18.0.0) will work with the hof-govuk-template templates as expected as the nonce value fields will only be added\nif a nonce value is provided by the version of HOF.\n\n## Example\n\nThere is an example implmentation in '/example'. To run:\n\n```\ncd example\nnpm install\nnpm start\n```\n","readmeFilename":"README.md"}