{"id":15021539,"url":"https://github.com/raideno/better-ejs","last_synced_at":"2026-03-06T08:33:24.904Z","repository":{"id":143855655,"uuid":"461589796","full_name":"raideno/better-ejs","owner":"raideno","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-03T21:12:01.000Z","size":416,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T10:56:01.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","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/raideno.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":"2022-02-20T19:13:16.000Z","updated_at":"2022-03-02T06:56:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ba0b573-3dc2-48f4-9fc8-bcaa73a515ae","html_url":"https://github.com/raideno/better-ejs","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"949696418ce729991e076379966a40c7b3470783"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/raideno/better-ejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raideno%2Fbetter-ejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raideno%2Fbetter-ejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raideno%2Fbetter-ejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raideno%2Fbetter-ejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raideno","download_url":"https://codeload.github.com/raideno/better-ejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raideno%2Fbetter-ejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30167963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-09-24T19:56:42.207Z","updated_at":"2026-03-06T08:33:24.882Z","avatar_url":"https://github.com/raideno.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Better-Ejs:\n\n![](https://img.shields.io/badge/-In%20developement-yellow)\n\u003cimg alt=\"badge\" src=\"https://img.shields.io/badge/-In%20developement-yellow\"\u003e\n\n***Not fully ready to use***\n\n## Install:\n\n```\nnpm install better-ejs\n```\n\n## How to use:\n\n**index.js:**\n\n```js\nconst app = express();\nconst { engine: bjs } = require('better-ejs');\n\n/*Tell express about better-ejs*/\nbjs(app);\n/*Set the default express view engine to better-ejs*/\napp.set('view engine', 'bjs');\n\napp.get('/:user?', (req, res) =\u003e {\n  const user = req.params.user | 'No One';\n  res.render('index', { user });\n});\n\napp.listen(3000, () =\u003e console.log('[Port]:', 3000));\n```\n\n**views/index.bjs**\n\n```html\n\u003cbody\u003e\n  {{ include(\"./components/navbar.bjs\", { user }); }}\n  \u003ch1\u003eHome\u003ch1\u003e\n  \u003ch2\u003eUser: \u003ca href=\"#\"\u003e{{ out(user) }}\u003c/a\u003e\u003c/h2\u003e\n  \u003ch3\u003e\n  {{\n    if (user === \"admin\")\n    {\n      out(\"It's an admin !\");\n    }\n    else out(\"It's not and admin !\");\n  }}\n  \u003ch3\u003e\n\u003c/body\u003e\n```\n\n**views/components/navbar.bjs**\n\n```html\n\u003cnav\u003e\n  \u003ch1\u003e\n    NavBar: \n    {{\n      if (user) {\n        out(user)     \n      } else {\n        out(\"\u003ca href='/login'\u003eLogin\u003c/a\u003e\");\n      }\n    }}\n  \u003c/h1\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"/contacts\"\u003eContacts\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"/about\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/nav\u003e\n```\n\n## Documentation\n\n`out(...data:string)`: To output something to the Html Document\n\n## Known Issues\n\n- Remove the access to variables defined in the `compiler/index.ts` file to the user to prevent future problems","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraideno%2Fbetter-ejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraideno%2Fbetter-ejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraideno%2Fbetter-ejs/lists"}