{"id":16890182,"url":"https://github.com/marak/html","last_synced_at":"2025-03-17T06:31:45.900Z","repository":{"id":4334655,"uuid":"5470293","full_name":"Marak/HTML","owner":"Marak","description":"HTML is The BEST JavaScript templating language EVER","archived":false,"fork":false,"pushed_at":"2013-06-03T23:34:52.000Z","size":261,"stargazers_count":101,"open_issues_count":1,"forks_count":64,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-29T11:27:27.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://html-lang.com","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/Marak.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}},"created_at":"2012-08-19T11:04:01.000Z","updated_at":"2024-08-24T02:01:44.000Z","dependencies_parsed_at":"2022-09-02T03:40:15.174Z","dependency_job_id":null,"html_url":"https://github.com/Marak/HTML","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FHTML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FHTML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FHTML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marak%2FHTML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marak","download_url":"https://codeload.github.com/Marak/HTML/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847062,"owners_count":20357317,"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-10-13T17:01:05.998Z","updated_at":"2025-03-17T06:31:45.218Z","avatar_url":"https://github.com/Marak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML is The BEST JavaScript templating language EVER\n\n**HTML was heavily inspired by [Jade](http://github.com/visionmedia/jade) from [Visionmedia](http://github.com/visionmedia/)**\n\n## Features\n\n - HTML is valid (X) HTML 4.01 and HTML5!\n - HTML is Insanely Fast !\n - Safari, Internet Explorer, Chrome, and Firefox are all specifically optimized for rendering HTML!\n - HTML is highly portable ( Even tested it in Microsoft Frontpage and Macromedia Dreamweaver )\n - HTML is `\u003c 4 bytes` in size!\n - It's not possible to write logic in HTML\n - I'm pretty annoyed I had to build this. \n \n*Note: I have no fucking clue how to successfully use [Weld](https://github.com/hij1nx/weld) or [Plates](https://github.com/flatiron/plates).*\n\n## Core Concepts\n\n - You already know HTML\n - JSON data automatically maps to CSS classes\n - You cannot define any custom logic or maps with HTML\n - That's it.\n\n## Examples\n\n### Rendering basic data\n\n```js\nvar html = require('html-lang');\nconsole.log(html.render({ name: \"Bob\" }, tmpl));\n```\n\n```html\n\u003cp class=\"name\"\u003ename placeholder\u003c/p\u003e\n```\n\n**outputs:**\n\n```html\n\u003cp class=\"name\"\u003eBob\u003c/p\u003e\n```\n\n### Rendering an Object\n\n```js\nvar html = require('html-lang');\n\nvar user = { user: { name: \"Bob\", email: \"bob@bob.com\" }};\n\nconsole.log(html.render(user, tmpl));\n```\n\n```html\n\u003cdiv class=\"user\"\u003e\n  \u003cp class=\"name\"\u003ename placeholder\u003c/p\u003e\n  \u003cp class=\"email\"\u003eemail placeholder\u003c/p\u003e\n\u003c/div\u003e\n```\n\n**outputs:**\n\n```html\n\u003cdiv class=\"user\"\u003e\n  \u003cp class=\"name\"\u003eBob\u003c/p\u003e\n  \u003cp class=\"email\"\u003ebob@bob.com\u003c/p\u003e\n\u003c/div\u003e\n```\n\n### Rendering an Array of Objects ( collection )\n\n```js\nvar html = require('html-lang');\n\nvar users = [ \n  { name: \"Bob\", email: \"bob@bob.com\"}, \n  { name: \"Marak\", email: \"marak@marak.com\"}\n];\n\nconsole.log(html.render(users, tmpl));\n```\n\n\n```html\n\u003cdiv class=\"users\"\u003e\n  \u003cdiv class=\"user\"\u003e\n    \u003cp class=\"name\"\u003ename placeholder\u003c/p\u003e\n    \u003cp class=\"email\"\u003eemail placeholder\u003c/p\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n**outputs:**\n\n```html\n\u003cdiv class=\"users\"\u003e\n  \u003cdiv class=\"user\"\u003e\n    \u003cp\u003eBob\u003c/p\u003e\n    \u003cp\u003ebob@bob.com\u003c/p\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"user\"\u003e\n    \u003cp\u003eMarak\u003c/p\u003e\n    \u003cp\u003emarak@marak.com\u003c/p\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### XML Node Attributes\n\n```html\n\u003cp class=\"name\"\u003e\u003ca href=\"\" class=\"link\"\u003e\u003c/a\u003e\u003c/p\u003e\n```\n\n```js\nvar html = require('html-lang');\n\nvar data = { \n  'link': \"The big website\", \n  'link.href': \"http://big.vc\" \n};\n\nconsole.log(html.render(data, tmpl));\n```\n**outputs:**\n\n```html\n\u003cp class=\"name\"\u003e\u003ca href=\"http://big.vc\" class=\"link\"\u003eThe big website\u003c/a\u003e\u003c/p\u003e\n```\n\n# That's it. I challenge you to find a use-case that isn't covered by HTML.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fhtml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarak%2Fhtml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarak%2Fhtml/lists"}