{"id":26284665,"url":"https://github.com/hargne/html-creator","last_synced_at":"2025-04-06T12:09:08.283Z","repository":{"id":25600634,"uuid":"95899133","full_name":"Hargne/html-creator","owner":"Hargne","description":"Generate HTML with node.js","archived":false,"fork":false,"pushed_at":"2025-02-11T18:12:31.000Z","size":1070,"stargazers_count":31,"open_issues_count":0,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T02:35:18.684Z","etag":null,"topics":["generator","html","html-generation","html-tags","node","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hargne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-06-30T15:03:35.000Z","updated_at":"2025-02-11T18:09:59.000Z","dependencies_parsed_at":"2024-06-18T18:25:25.831Z","dependency_job_id":"470f6cbe-c01d-4105-b938-1b2b507589c1","html_url":"https://github.com/Hargne/html-creator","commit_stats":{"total_commits":78,"total_committers":7,"mean_commits":"11.142857142857142","dds":0.6153846153846154,"last_synced_commit":"7bfbd83e666c182ed2665dbc98916f4daf992509"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hargne%2Fhtml-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hargne%2Fhtml-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hargne%2Fhtml-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hargne%2Fhtml-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hargne","download_url":"https://codeload.github.com/Hargne/html-creator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"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":["generator","html","html-generation","html-tags","node","nodejs"],"created_at":"2025-03-14T18:37:07.202Z","updated_at":"2025-04-06T12:09:08.238Z","avatar_url":"https://github.com/Hargne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003e⚙️ html-creator\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Generate HTML with NodeJS\n    \u003cbr\u003e\n    \u003ca href=\"https://github.com/Hargne/html-creator/wiki\"\u003e\u003cstrong\u003eDocumentation »\u003c/strong\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Installation\n\n```shell\n$ npm i html-creator\n```\n\n## Usage\n\n```Javascript\nconst htmlCreator = require(\"html-creator\");\n\nconst html = new htmlCreator([\n  {\n    type: \"head\",\n    content: [\n      {\n        type: \"title\",\n        content: \"Generated HTML\",\n      },\n      {\n        type: \"style\",\n        content: `\n          #cool-text {\n            color: red;\n          }\n        `,\n      },\n    ],\n  },\n  {\n    type: \"body\",\n    content: [\n      {\n        type: \"div\",\n        content: [\n          {\n            type: \"div\",\n            content: \"This is a cool text 😎\",\n            attributes: { id: \"cool-text\" },\n          },\n          {\n            type: \"a\",\n            content: \"Click here\",\n            attributes: { href: \"/path-to-infinity\", target: \"_blank\" },\n          },\n        ],\n      },\n    ],\n  },\n]);\nconst result = html.renderHTML();\n```\n\nThe above code will result with the following HTML output:\n\n```HTML\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eGenerated HTML\u003c/title\u003e\n    \u003cstyle\u003e\n      #cool-text {\n        color: red;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv\u003e\n      \u003cdiv id=\"cool-text\"\u003eThis is a cool text 😎\u003c/div\u003e\n      \u003ca href=\"/path-to-infinity\" target=\"_blank\"\u003eClick here\u003c/a\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nVisit the **[wiki](https://github.com/Hargne/html-creator/wiki)** for more examples of usage, method reference and further reading.\n\n# Wanna Contribute?\n\nDo you believe that something is missing from this plugin or perhaps is not working as intended? Awesome-pants! Help is always appreciated.\nJust be sure to read through the [Contributing Handbook](https://github.com/Hargne/html-creator/wiki/Contributing-Handbook) (and remember to have a jolly good time).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhargne%2Fhtml-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhargne%2Fhtml-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhargne%2Fhtml-creator/lists"}