{"id":22379153,"url":"https://github.com/sky-uk/node-masthead-injector","last_synced_at":"2025-07-31T01:31:59.236Z","repository":{"id":48556720,"uuid":"45612808","full_name":"sky-uk/node-masthead-injector","owner":"sky-uk","description":"Used to place masthead footer and header onto our node apps","archived":false,"fork":false,"pushed_at":"2021-07-20T15:47:53.000Z","size":27,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":42,"default_branch":"master","last_synced_at":"2023-07-07T11:01:57.885Z","etag":null,"topics":["digital-help","online-service"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sky-uk.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-11-05T13:26:09.000Z","updated_at":"2023-07-07T11:01:57.886Z","dependencies_parsed_at":"2022-09-01T00:11:47.663Z","dependency_job_id":null,"html_url":"https://github.com/sky-uk/node-masthead-injector","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fnode-masthead-injector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fnode-masthead-injector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fnode-masthead-injector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fnode-masthead-injector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sky-uk","download_url":"https://codeload.github.com/sky-uk/node-masthead-injector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228204604,"owners_count":17884711,"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":["digital-help","online-service"],"created_at":"2024-12-04T23:09:08.289Z","updated_at":"2024-12-04T23:09:09.119Z","avatar_url":"https://github.com/sky-uk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-masthead-injector\n\nv0.2.1\n\n##### Purpose\n\nTo provide an simple interface to the masthead API within node.\n\n##### Usage\n\n1) Install the node module using the setup instructions below.\n2) Import / Require the masthead\n3) Call masthead.get() and receive a promise\n```\nimport masthead from 'masthead';\n\nmasthead.get()\n  .then(function(assets) {\n    console.log(assets);\n  })\n  .catch(function(error) {\n    // An asset could not be retrieved\n  });\n```\n\n#####  Setup (Development)\n\n`npm install`  \\\n`npm run dev`\n\n##### Setup (As a node module)\n\n`npm install --save https://github.com/sky-uk/node-masthead-injector.git`\n\n##### Tests\n\n`npm test`\n\n##### Overriding the configuration\n\nYou can override these attributes by calling `masthead.setConfig()` before calling `masthead.get()`. Pass in an object to override individual attributes or the entire object.\n```\n{\n    host: 'https://assets.sky.com/new',\n    siteArea: 'help-and-support',\n    assets: [{\n      section: 'head',\n      path: '/resources/css'\n    }, {\n      section: 'header',\n      path: '/masthead/help-and-support'\n    }, {\n      section: 'footer',\n      path: '/footer'\n    }, {\n      section: 'js',\n      path: '/resources/js'\n    }]\n  }\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-uk%2Fnode-masthead-injector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsky-uk%2Fnode-masthead-injector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-uk%2Fnode-masthead-injector/lists"}