{"id":15546915,"url":"https://github.com/nirkog/shoko","last_synced_at":"2025-10-16T07:10:40.068Z","repository":{"id":57358643,"uuid":"96981174","full_name":"nirkog/Shoko","owner":"nirkog","description":"A blazing fast templating engine","archived":false,"fork":false,"pushed_at":"2017-10-13T13:03:25.000Z","size":1253,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T01:18:27.542Z","etag":null,"topics":["express","express-js","expressjs","javascript","node-js","npm-package","server-side","shoko","template-engine","templating-engine","templating-language"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nirkog.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}},"created_at":"2017-07-12T07:59:53.000Z","updated_at":"2017-07-27T09:39:44.000Z","dependencies_parsed_at":"2022-09-06T22:21:40.831Z","dependency_job_id":null,"html_url":"https://github.com/nirkog/Shoko","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/nirkog%2FShoko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirkog%2FShoko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirkog%2FShoko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirkog%2FShoko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirkog","download_url":"https://codeload.github.com/nirkog/Shoko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122392,"owners_count":20726823,"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":["express","express-js","expressjs","javascript","node-js","npm-package","server-side","shoko","template-engine","templating-engine","templating-language"],"created_at":"2024-10-02T13:05:21.329Z","updated_at":"2025-10-16T07:10:39.980Z","avatar_url":"https://github.com/nirkog.png","language":"JavaScript","readme":"# Shoko\n\n#### A node.js templating engine\n\n**Shoko** is a simple to use templating engine, with a very straight forward and intuative syntax. Shoko also offers many other features, including: mixins, variables, comments.  \nAs shoko is in it's early development, many features that we intend to add are stil missing.\n\n## Installation\n\nShoko is super easy to get up and running.\nsimply download it from npm, like this.\n\n    npm install shoko --save\n\n## Syntax\n\nShoko has a very easy to grasp syntax. Elements in shoko are seprated by curly braces.  \nHere is an example:\n\n    doctype html\n    html {\n        head {\n            title {\n                'My First Shoko Page'\n            }\n        }\n\n        body {\n            h1 {\n                'Shoko is awesome.'\n            }\n        }\n    }\n\nWhich will render to this HTML:\n\n    \u003c!DOCTYPE html\u003e\n    \u003chead\u003e\n        \u003chead\u003e\n            \u003ctitle\u003eMy First Shoko Page\u003c/title\u003e\n        \u003c/head\u003e\n\n        \u003cbody\u003e\n            \u003ch1\u003e\n                My First Shoko Page\n            \u003c/h1\u003e\n        \u003c/body\u003e\n    \u003c/head\u003e\n\n## API\n\n**Shoko is really easy to use.**  \nTo render plain shoko text, just use the render function.\n\n    const shoko = require('shoko');  \n\n    let textToRender = 'h1 { \"Hello world\" }';\n\n    //\u003ch1\u003eHello world\u003c/h1\u003e\n    let renderedHTML = shoko.render(textToRender);\n\nTo render from a file, use the renderFile function.\n\n    let renderedFile = shoko.renderFile('file.sk');\n\n**Yes, I'ts that simple!**\n\n## Framework Integration\n\n### List of frameworks:\n- Express.js\n- hapi.js\n\n### Integrating with Express.js\n\nIntegrating Shoko with Express is so easy.  \nJust set the engine to the _Shoko renderFile_ function.\n\n    app.engine('sk', shoko.renderFile);\n\nThen, you can just render views normally. For example:\n\n    app.get('/', (res, req) =\u003e {\n        res.render('index', {});\n    });\n\n\n### Integrating with Hapi.js\n\nLike express, integrating Shoko with Hapi is very easy;\nJust register shoko as the engine.\n\n    server.register(require('vision'), (err) =\u003e {\n        server.views({\n            engines: {\n                html: require('shoko')\n            }\n        });\n    });\n\nThen, you can just render views normally. For example:\n\n    server.route({\n        method: 'GET',\n        path: '/',\n        handler: function (request, reply) {\n            reply.view('index');\n        }\n    });","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirkog%2Fshoko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirkog%2Fshoko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirkog%2Fshoko/lists"}