{"id":13458114,"url":"https://github.com/juancarlospaco/nim-html-dsl","last_synced_at":"2025-04-12T00:23:19.134Z","repository":{"id":145877166,"uuid":"153895830","full_name":"juancarlospaco/nim-html-dsl","owner":"juancarlospaco","description":"Nim HTML DSL","archived":false,"fork":false,"pushed_at":"2020-04-14T07:43:30.000Z","size":176,"stargazers_count":68,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T20:11:12.774Z","etag":null,"topics":["bulma-css","dsl","html","html5","nim","nim-lang","spectre-css"],"latest_commit_sha":null,"homepage":null,"language":"Nim","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/juancarlospaco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-20T10:48:53.000Z","updated_at":"2025-01-27T09:25:46.000Z","dependencies_parsed_at":"2024-01-06T12:03:44.720Z","dependency_job_id":"5678d2f7-2a88-440e-9f6e-f05e766af9aa","html_url":"https://github.com/juancarlospaco/nim-html-dsl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlospaco%2Fnim-html-dsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlospaco%2Fnim-html-dsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlospaco%2Fnim-html-dsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juancarlospaco%2Fnim-html-dsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juancarlospaco","download_url":"https://codeload.github.com/juancarlospaco/nim-html-dsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248498482,"owners_count":21114130,"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":["bulma-css","dsl","html","html5","nim","nim-lang","spectre-css"],"created_at":"2024-07-31T09:00:44.947Z","updated_at":"2025-04-12T00:23:19.091Z","avatar_url":"https://github.com/juancarlospaco.png","language":"Nim","funding_links":[],"categories":["Template engine","Web"],"sub_categories":["Template Engines"],"readme":"# Nim-HTML-DSL\n\n- [Nim](https://nim-lang.org) HTML DSL, [Domain Specific Language](https://en.wikipedia.org/wiki/Domain-specific_language) for HTML embedded on Nim lang code (Not a template engine).\n\n![HTML DSL](https://raw.githubusercontent.com/juancarlospaco/nim-html-dsl/master/temp.png \"HTML for Cats\")\n\n\n# Use\n\n```nim\nimport html_dsl\n\nconst page = html:\n  heads:\n    title \"Title\"\n    meta(name=\"foo\", content=\"bar\")\n  bodys:\n    p \"Powered by Nim Metaprogramming\"\n    `\u003c!--` \"HTML Comment\"\n    a(text=\"Nim\", href=\"https://nim-lang.org\")\n    divs:\n      p \"Example\"\n\nassert page is string\necho page\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to see Output\u003c/summary\u003e\n\nBuild for Development:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml class='has-navbar-fixed-top'\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\u003cmeta name=\"viewport\" content=\"width=device-width,initial-scale=1\"\u003e \u003cmeta name=\"foo\" content=\"bar\" \u003e\n    \u003ctitle\u003eTitle\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody class='has-navbar-fixed-top'\u003e\n    \u003cp \u003e Powered by Nim Metaprogramming\u003c/p\u003e\n\n    \u003c!--  HTML Comment  --\u003e\n\n    \u003ca href=\"https://nim-lang.org\" \u003e Nim\u003c/a\u003e\n    \u003cdiv \u003e\n      \u003cp \u003e Example\u003c/p\u003e\n      \u003cp \u003e Example\u003c/p\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n\n```\n\nBuild for Release:\n\n```html\n\u003c!DOCTYPE html\u003e\u003chtml class='has-navbar-fixed-top'\u003e\u003chead\u003e\u003cmeta charset=\"utf-8\"\u003e\u003cmeta name=\"viewport\" content=\"width=device-width,initial-scale=1\"\u003e\u003cmeta name=\"foo\" content=\"bar\" \u003e\u003ctitle\u003eTitle\u003c/title\u003e\u003c/head\u003e\u003cbody class='has-navbar-fixed-top'\u003e\u003cp\u003ePowered by Nim Metaprogramming\u003c/p\u003e\u003ca href=\"https://nim-lang.org\" \u003eNim\u003c/a\u003e\u003cdiv\u003e\u003cp\u003eExample\u003c/p\u003e\u003cp\u003eExample\u003c/p\u003e\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e\n```\n\n\u003c/details\u003e\n\n\n# Design\n\n- 1 file, ~300 Lines of Code, as fast as `const`, `42` Kilobytes *Hello World* file size.\n- Works for JavaScript and NodeJS and NimScript.\n- [Bulma CSS ready](https://bulma.io), [Spectre CSS ready](https://picturepan2.github.io/spectre/getting-started.html).\n- Minified when build for Release, Pretty-Printed when build for Development.\n- [Functional Programming](https://en.wikipedia.org/wiki/Functional_programming), no side-effects, all functions are `func`.\n- `\u003cdiv\u003e` is named `divs`, `\u003cbody\u003e` is named `bodys`, `\u003chead\u003e` is named `heads`, to avoid eventual name shadowing with other libs.\n- HTML5, UTF-8, Responsive, all Tags supported, all Attributes supported.\n\n\n# FAQ\n\n- Whats the Performance cost of using this?.\n\n0. Zero. None. Everything is done at Compile-Time.\n\n- Can be used with Jester?.\n\nYes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuancarlospaco%2Fnim-html-dsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuancarlospaco%2Fnim-html-dsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuancarlospaco%2Fnim-html-dsl/lists"}