{"id":19504716,"url":"https://github.com/nice-digital/js2html","last_synced_at":"2025-10-04T19:05:51.639Z","repository":{"id":82181877,"uuid":"42708633","full_name":"nice-digital/js2html","owner":"nice-digital","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-02T11:41:02.000Z","size":208,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-09-20T04:40:40.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","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":"LICENSE.txt","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-09-18T08:18:20.000Z","updated_at":"2015-09-18T08:52:04.000Z","dependencies_parsed_at":"2023-06-06T00:15:45.448Z","dependency_job_id":null,"html_url":"https://github.com/nice-digital/js2html","commit_stats":null,"previous_names":["nhsevidence/js2html"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nice-digital/js2html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjs2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjs2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjs2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjs2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nice-digital","download_url":"https://codeload.github.com/nice-digital/js2html/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nice-digital%2Fjs2html/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278358909,"owners_count":25974034,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:26:54.772Z","updated_at":"2025-10-04T19:05:51.583Z","avatar_url":"https://github.com/nice-digital.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Process Json-Ld serializations into models and run through dotLiquid to generate HTML\n\n##Example usage:\n\n\n### Apply template 'test.html' to {'hello':'world'} and write to stdout\n\n```\n   js2html --json \"{'hello':'world'}\" --template test.html\n```\n\n### Apply template 'page.html' to *.json in templatedir, writing .html files to /html\n\n```\n   js2html --file *.json --templatedir /templates --output /html --template page.html\n```\n \n \n##Templating examples\n\nInput Json-Ld. \n\n~~~ .json\n{\n    \"@id\": \"http://ld.nice.org.uk/prov/entity#98ead3d:qualitystandards/qs70/st2/Statement.md\",\n    \"@type\": [\"prov:Entity\", \"owl:NamedIndividual\"],\n    \"qualitystandard:setting\": \"http://ld.nice.org.uk/ns/qualitystandard/setting#Primary care setting\",\n    \"qualitystandard:targetPopulation\": [\"http://ld.nice.org.uk/ns/qualitystandard/agegroup#Children 1-15 years\", \"http://ld.nice.org.uk/ns/qualitystandard/agegroup#Young people\", \"http://ld.nice.org.uk/ns/qualitystandard/conditiondisease#Urinary incontinence\"],\n    \"dcterms:abstract\": \"Children and young people have an agreed review date if they, or their\\nparents or carers, are given advice about changing their daily routine\\nto help with bedwetting.\",\n    \"dcterms:title\": \"Quality statement 2: Review after initial advice is given\",\n    \"prov:specializationOf\": \"resource:FF2ED3E529E5BDCDED86C24D3277F8A156814492DFE352A09804DF3228109D63\",\n    \"_id\": \"resource:FF2ED3E529E5BDCDED86C24D3277F8A156814492DFE352A09804DF3228109D63\",\n    \"_type\": \"qualitystatement\"\n}\n---\n\nProperty names are transformed before injection into the template engine. '@' and ':' are removed so that it can render IRI properties. Property name access in dotLiquid is case insensitive, so you can use convention to indicate namespace - dcterms:Abstract can become dctermsAbstract.\n\n##Example template\n\n~~~ .html\n\u003cdiv\u003e{{@id}}\u003c/div\u003e\n\u003cdiv\u003e{{_id}}\u003c/div\u003e\n\u003cdiv\u003e{{qualitystandardSetting}}\u003c/div\u003e\n\u003cdiv\u003e{{dctermsAbstract}}\u003c/div\u003e\n\u003cul\u003e\n{% for item in type -%}\n    \u003cli\u003e{{item}}\u003c/li\u003e\n{% endfor -%}\n\u003c/ul\u003e\n---\n\nApplying this template to the sample Json-Ld produces\n\n~~~ .html\n\u003cdiv\u003ehttp://ld.nice.org.uk/prov/entity#98ead3d:qualitystandards/qs70/st2/Statement.md\u003c/div\u003e\n\u003cdiv\u003eresource:FF2ED3E529E5BDCDED86C24D3277F8A156814492DFE352A09804DF3228109D63\u003c/div\u003e\n\u003cdiv\u003ehttp://ld.nice.org.uk/ns/qualitystandard/setting#Primary care setting\u003c/div\u003e\n\u003cdiv\u003eChildren and young people have an agreed review date if they, or their\nparents or carers, are given advice about changing their daily routine\nto help with bedwetting.\u003c/div\u003e\n\u003cul\u003e\n    \u003cli\u003eprov:Entity\u003c/li\u003e\n    \u003cli\u003eowl:NamedIndividual\u003c/li\u003e\n\u003c/ul\u003e\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fjs2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnice-digital%2Fjs2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnice-digital%2Fjs2html/lists"}