{"id":19504824,"url":"https://github.com/nice-digital/jsonld2html","last_synced_at":"2025-02-25T22:12:59.122Z","repository":{"id":82181876,"uuid":"43676040","full_name":"nice-digital/jsonld2html","owner":"nice-digital","description":null,"archived":false,"fork":false,"pushed_at":"2016-03-29T12:42:39.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-01-08T10:45:33.678Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nice-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2015-10-05T09:40:55.000Z","updated_at":"2016-01-11T15:37:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb266b39-d47f-4c93-b5ce-e613086f0375","html_url":"https://github.com/nice-digital/jsonld2html","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjsonld2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjsonld2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjsonld2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjsonld2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/jsonld2html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240754366,"owners_count":19852189,"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":"2024-11-10T22:27:20.395Z","updated_at":"2025-02-25T22:12:59.066Z","avatar_url":"https://github.com/nice-digital.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonld2html\n\n\u003e convert JSON-LD graphs into HTML with handlebars view templates\n\n## Getting Started\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install https://github.com/nhsevidence/jsonld2html.git --save\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('jsonld2html');\n```\n\n## JSONLD2HTML task\n_Run this task with the `grunt jsonld2html` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n\n### Options\n\n#### helpers\nType: `Object`\nDefault: `{}`\n\nThis provides access to helper methods, such as text formatters, within the Handlebars templates. \n\n_Note: Please, consider the map function before creating complex template logic._\n\n#### metadata\nType: `Object`  \nDefault: `{}`\n\nProvides a way to include cross template dynamic model data for inclusion in all templates.\n\n#### partials\nType: 'String'\nDefault: './src/views/partials'\n\nLocation of view partial templates.\n\n#### views\nType: 'String'\nDefault: './src/views'\n\nLocation of view templates.\n\n#### map\nType: 'Function'\nDefault: (m) =\u003e m\n\nMap function used to transform the JSON-LD Graph into a more viable JSON Model Object.\n\n### Usage Example\n\n```js\njsonld2html: {\n  models: {\n    options: {\n      view: 'model',\n      map: (m) =\u003e m,\n    },\n    expand: true,\n    src:    ['path/to/dir/*.json'],\n    dest:   'wwwroot',\n    ext:    '.html',\n  }\n}\n```\n\n#### Globbing Patterns\n\nSee documentation [in the Grunt Docs](http://gruntjs.com/configuring-tasks#globbing-patterns), for globbing pattern information\n\n##### Skipping Files\n\n```js\n// Process all .json files, but skips index.json file\njsonld2html: {\n  models: {\n    src: [\"path/to/dir/*.json\", \"!path/to/dir/index.json\"]\n  }\n}\n```\n\n###### Options\n\nOptions can be specified for all `jsonld2html` tasks and for each `jsonld2html:target` just like in other Grunt tasks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fjsonld2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fjsonld2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fjsonld2html/lists"}