{"id":46458081,"url":"https://github.com/sgolub/atat","last_synced_at":"2026-03-06T02:58:07.083Z","repository":{"id":19348236,"uuid":"85351299","full_name":"sgolub/atat","owner":"sgolub","description":"🏗 Fast and simple JavaScript template engine","archived":false,"fork":false,"pushed_at":"2023-03-04T05:01:59.000Z","size":1540,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-23T02:16:04.778Z","etag":null,"topics":["express","html","javascript","nodejs","templating","templating-engine","typescript"],"latest_commit_sha":null,"homepage":"https://sgolub.github.io/atat/","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/sgolub.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-17T20:17:36.000Z","updated_at":"2024-01-22T22:19:23.000Z","dependencies_parsed_at":"2024-10-09T16:00:49.377Z","dependency_job_id":"5f702c5d-27ad-4463-b18f-1ef25dfc374e","html_url":"https://github.com/sgolub/atat","commit_stats":{"total_commits":69,"total_committers":4,"mean_commits":17.25,"dds":0.5072463768115942,"last_synced_commit":"5d44e24b5a1a0135556d24713635732dd56589e8"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/sgolub/atat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolub%2Fatat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolub%2Fatat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolub%2Fatat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolub%2Fatat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgolub","download_url":"https://codeload.github.com/sgolub/atat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgolub%2Fatat/sbom","scorecard":{"id":814467,"data":{"date":"2025-08-11","repo":{"name":"github.com/sgolub/atat","commit":"5d44e24b5a1a0135556d24713635732dd56589e8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/sgolub/atat/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/sgolub/atat/main.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"24 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T13:54:53.706Z","repository_id":19348236,"created_at":"2025-08-23T13:54:53.706Z","updated_at":"2025-08-23T13:54:53.706Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"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":["express","html","javascript","nodejs","templating","templating-engine","typescript"],"created_at":"2026-03-06T02:58:06.457Z","updated_at":"2026-03-06T02:58:07.073Z","avatar_url":"https://github.com/sgolub.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"logo\" src=\"https://sgolub.github.io/atat/android-chrome-512x512.e5a25301.png\" width=\"128\"\u003e\n\u003c/p\u003e\n\n# αtαt\n\nFast and simple asynchronous JavaScript template engine without dependencies and for any environment (:\n\n[![Build Status](https://github.com/sgolub/atat/workflows/build/badge.svg)](https://github.com/sgolub/atat/actions)\n\n## But why?\n\nI wanted to create something simple for what you don't need to spend hours to read the documentation, something that you can start to use in a few minutes. The main idea is using pure JavaScript with pure HTML. You don't need to learn new syntax, just do everything like in JavaScript.\n\n## Features\n\n- Embedded JavaScript code\n- Browser support\n- Complies with Express\n- Layouts, partials and sections\n- No dependencies and very small size\n- TypeScript support\n- Easy to use\n\n## Installation\n\nUsing yarn or npm:\n\n```bash\n$ yarn add atat\n$ npm install --save atat\n```\n\n## Tests\n\nUsing yarn or npm:\n\n```bash\n$ yarn test\n$ npm test\n```\n\n## Usage\n\n```js\nimport { config, parse, loadAndRender, render, loadAndParse } from 'atat';\n\nvar atat = require('atat');\n```\n\n`atat` object has the following methods\n\n- `config` to setup global configuration for all templates\n- `parse` to parse a template, returns a render function\n- `loadAndParse` the same with `parse` but allows a path to a template as the first argument\n- `render` to parse and render a template, returns the result string\n- `loadAndRender` the same with `render` but allows a path to a template as the first argument\n\n```js\nimport { parse, loadAndRender, render, loadAndParse } from 'atat';\n\nconst render = await parse(templateString, options);\ncontainer.innerHTML = render(model);\n\ncontainer.innerHTML = await render(templateString, model, options);\n\nconst render = await loadAndParse(pathToTemplate, options);\ncontainer.innerHTML = render(model);\n\ncontainer.innerHTML = await loadAndRender(pathToTemplate, model, options);\n```\n\nIf your environment doesn't support `async/await` sytax, use `Promise`\n\n```js\nrender(templateString, options).then((err, result) =\u003e {\n  container.innerHTML = result;\n});\n```\n\n### Options\n\n- `it` models variable name, default `\"it\"`\n- `$` helpers variable name, default `\"$\"`\n- `helpers` extra helpers\n- `loader` templates provider\n\n```js\nimport { parse, render, config, DEFAULT_LOADER } from 'atat';\nconst options = {\n    it: \"it\",\n    $: \"$\",\n    helpers: { },\n    loader: DEFAULT_LOADER\n};\n\n// global config will be applied to all templates\nconfig(options);\n\n// also you can pass options to the parse and render methods\nconst tmpl = await parse(templateString, options);\nconst html = await render(templateString, { /* model */ }, options);\n```\n\n### Loaders\n\nLoaders allow you to load templates asynchronously. There are two default loaders available right from the library:\n- `DEFAULT_LOADER` - for Node.js, default loader, uses `fs` module\n- `FETCH_LOADER` - for a browser, loads templates through `fetch` method\n\n```js\nimport { loadAndRender, loadAndParse, config, FETCH_LOADER, DEFAULT_LOADER } from 'atat';\n\nconst html = await loadAndRender(\n  path.resolve(__dirname, './views/main.html'),\n  { /* model */ },\n  { loader: DEFAULT_LOADER },\n);\n\n// in a browser you must specify loader, at least FETCH_LOADER\nconst html = await loadAndRender(\n  'http://localhost:3000/views/main.html',\n  { /* model */ },\n  { loader: FETCH_LOADER },\n);\n\n// custom loader\nconfig({\n  loader: async (path) =\u003e {\n    const template = await loadTemplate(path);\n    return template;\n  }\n});\n```\n\n### Syntax\n\nEncoded output\n\n```html\n\u003cp\u003e@(it.user.firstName)@\u003c/p\u003e\n\n\u003c!-- \n  Model: { user: { firstName: 'Charlotte' } }\n  Output:\n  \u003cp\u003eCharlotte\u003c/p\u003e\n --\u003e\n```\n\nRaw html output\n\n```html\n\u003cp\u003e@!(it.rawHTML)@\u003c/p\u003e\n\n\u003c!-- \n  Model: { rawHTML: '\u003ci\u003eHello!\u003c/i\u003e' }\n  Output:\n  \u003cp\u003e\u003ci\u003eHello!\u003c/i\u003e\u003c/p\u003e\n --\u003e\n```\n\nEmbedded JavaScript code\n\n```html\n@{\n  // Any JavaScript code is acceptable in this block\n  var firstName = it.user.firstName;\n  var secondName = it.user.secondName;\n}@\n\n\u003cp\u003e@(firstName)@ @(secondName)@\u003c/p\u003e\n\n\u003c!-- \n  Model: { user: { firstName: 'Charlotte', secondName: 'Gamboa' } }\n  Output:\n  \u003cp\u003eCharlotte Gamboa\u003c/p\u003e\n --\u003e\n```\n\n**@if**\n\n```html\n@if (it.user != null) {\n\u003cp\u003e@(it.user.firstName)@\u003c/p\u003e\n\u003cp\u003e@(it.user.secondName)@\u003c/p\u003e\n}@\n\n\u003c!-- \n  Model: { user: { firstName: 'Charlotte', secondName: 'Gamboa' } }\n  Output:\n  \u003cp\u003eCharlotte\u003c/p\u003e\n  \u003cp\u003eSmith\u003c/p\u003e\n --\u003e\n```\n\n**@if...else if...else**\n\n```html\n@if(it.user \u0026\u0026 it.user.firstName \u0026\u0026 it.user.secondName){\n\u003cp\u003e@(it.user.firstName)@\u003c/p\u003e\n\u003cp\u003e@(it.user.secondName)@\u003c/p\u003e\n} else if (it.user \u0026\u0026 it.user.firstName) {\n\u003cp\u003e@(it.user.firstName)@\u003c/p\u003e\n} else {\n\u003cp\u003eUser is not defined\u003c/p\u003e\n}@\n\n\u003c!-- \n  Model: { user: { firstName: 'Charlotte', secondName: '' } }\n  Output:\n  \u003cp\u003eCharlotte\u003c/p\u003e\n --\u003e\n```\n\n**@for**\n\n```html\n\u003cul\u003e\n  @for(var i = 0, l = it.users.length; i \u003c l; i++){\n  \u003cli\u003e@(it.users[i].firstName)@ @(it.users[i].secondName)@\u003c/li\u003e\n  }@\n\u003c/ul\u003e\n\n\u003c!-- \n  Model: { users: [{ firstName: 'Charlotte', secondName: 'Gamboa' }] }\n  Output:\n  \u003cul\u003e\n    \u003cli\u003eCharlotte Gamboa\u003c/li\u003e\n  \u003c/ul\u003e\n --\u003e\n```\n\n**@while**\n\n```html\n\u003cul\u003e\n  @{ var i = 0, j = 5; }@\n  @while (i \u003c j) {\n  \u003cli\u003e@(i++)@\u003c/li\u003e\n  }@\n\u003c/ul\u003e\n\n\u003c!-- \n  Output:\n  \u003cul\u003e\n    \u003cli\u003e1\u003c/li\u003e\n    \u003cli\u003e2\u003c/li\u003e\n    \u003cli\u003e3\u003c/li\u003e\n    \u003cli\u003e4\u003c/li\u003e\n    \u003cli\u003e5\u003c/li\u003e\n  \u003c/ul\u003e\n --\u003e\n```\n\n### Helpers\n\n#### Custom helper\n\n`@\u003cname\u003e(\u003cargs...\u003e)@`\n\n- `name` the valid name\n- `args...` whatever you want\n\n```js\nconst options = {\n    $: '$',\n    helpers: {\n      l10n: (lang, key) =\u003e resources[lang][key];\n    }\n};\n\nconst result = await atat.render(template, { lang: 'en' }, options);\n```\n\n```html\n\u003ctitle\u003e@l10n(it.lang, \"title\")@\u003c/title\u003e\n\u003ctitle\u003e@('My Website - ' + $.l10n(it.lang, \"title\"))@\u003c/title\u003e\n\n\u003c!-- \n  Model: { lang: 'en' }\n  Output:\n  \u003ctitle\u003eMain page\u003c/title\u003e\n  \u003ctitle\u003eMy Website - Main page\u003c/title\u003e\n --\u003e\n```\n\n#### Default helpers\n\n- `@json(\u003cobject\u003e)@` returns a result of JSON stringify\n- `@encode(\u003cstring\u003e)@` the same as `@(\u003cstring\u003e)@`\n- `@join(\u003carray\u003e, \u003cseparator\u003e)@` joins the array with the separator (optional)\n- `@upper(\u003cstring\u003e)@` simple uppercase\n- `@lower(\u003cstring\u003e)@` simple lowercase\n\n### Layout\n\n`@layout(\u003cpath\u003e)@`\n\n- `path` the path to the layout file\n\n**index.atat**\n\n```html\n@layout('/views/_layout.atat')@\n\u003cdiv class=\"page-container\"\u003e\n  Home page!\n\u003c/div\u003e\n```\n\n**/views/\\_layout.atat**\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmain\u003e\n      @!(body)@\n    \u003c/main\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nOutput:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmain\u003e\n      \u003cdiv class=\"page-container\"\u003e\n        Home page!\n      \u003c/div\u003e\n    \u003c/main\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Patrial\n\nPatrials allow you to reuse useful pieces of code in different places\n\n`@partial(\u003cpath\u003e, \u003cmodel\u003e)@`\n\n- `path` path to partial a view file\n- `model` model for a partial view (optional)\n\n**views/\\_menu.atat**\n\n```html\n\u003cnav role=\"main\"\u003e\n  \u003cul\u003e\n    \u003cli\u003e\n      \u003ca href=\"/\" class=\"@(it.page=='home'?'active':'')@\"\u003eHome\u003c/a\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"/about\" class=\"@(it.page=='home'?'active':'')@\"\u003eAbout\u003c/a\u003e\n    \u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/nav\u003e\n```\n\n**views/\\_layout.atat**\n\n```html\n@{ const { $route } = it; }@\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    @partial('/views/_menu.atat', $route)@\n    \u003cmain\u003e\n      @!(body)@\n    \u003c/main\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nOutput:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cnav role=\"main\"\u003e\n      \u003cul\u003e\n        \u003cli\u003e\n          \u003ca href=\"/\" class=\"active\"\u003eHome\u003c/a\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\n          \u003ca href=\"/about\" class=\"\"\u003eAbout\u003c/a\u003e\n        \u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/nav\u003e\n    \u003cmain\u003e\n      \u003c!-- Home page content --\u003e\n    \u003c/main\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Section\n\nSection allows you to pass HTML markup from a view to a layout level\n\nUse the following syntax to specify a new section\n\n```html\n@section script {\n\u003cscript\u003e\n  document.addEventListener('DOMContentLoaded', function() {\n    // your code is here\n  });\n\u003c/script\u003e\n}@\n```\n\nand another one to output the result anywhere\n\n`@section(\u003cname\u003e)@`\n\n- `name` sections name\n\n**index.atat**\n\n```html\n@layout('/views/_layout.atat')@\n\u003cdiv class=\"page-container\"\u003e\n  Home page!\n\u003c/div\u003e\n@section script {\n\u003cscript\u003e\n  document.addEventListener('DOMContentLoaded', function() {\n    // your code is here\n  });\n\u003c/script\u003e\n}@\n```\n\n**/views/\\_layout.atat**\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmain\u003e\n      @!(body)@\n    \u003c/main\u003e\n    @section('script')@\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nOutput:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmain\u003e\n      \u003cdiv class=\"page-container\"\u003e\n        Home page!\n      \u003c/div\u003e\n    \u003c/main\u003e\n    \u003cscript\u003e\n      document.addEventListener('DOMContentLoaded', function() {\n        // your code is here\n      });\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### ExpressJS Integration\n\nJust set `'view engine'` value to `atat`\n\n```js\nconst express = require('express');\n\nconst app = express();\n\napp.set('views', './views');\napp.set('view engine', 'atat');\n```\nExample available [here](https://github.com/sgolub/atat/tree/master/example)\n\n### Demo\n\n[Live demo](https://sgolub.github.io/atat)\n\n## License\n\nThe JavaScript Templates script is released under the [MIT license](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolub%2Fatat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgolub%2Fatat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgolub%2Fatat/lists"}