{"id":18762818,"url":"https://github.com/arnaucube/konstrui","last_synced_at":"2025-09-13T15:06:55.983Z","repository":{"id":57696806,"uuid":"91892285","full_name":"arnaucube/konstrui","owner":"arnaucube","description":"web templating engine for static websites, written in Go lang","archived":false,"fork":false,"pushed_at":"2017-11-12T00:06:46.000Z","size":3937,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T05:12:29.722Z","etag":null,"topics":["golang","template-engine","templating","web"],"latest_commit_sha":null,"homepage":"http://arnaucode.com/konstrui","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnaucube.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-05-20T13:51:28.000Z","updated_at":"2020-12-13T18:52:56.000Z","dependencies_parsed_at":"2022-09-10T18:20:08.825Z","dependency_job_id":null,"html_url":"https://github.com/arnaucube/konstrui","commit_stats":null,"previous_names":["arnaucode/konstrui","arnaucode/timmy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnaucube%2Fkonstrui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnaucube%2Fkonstrui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnaucube%2Fkonstrui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnaucube%2Fkonstrui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnaucube","download_url":"https://codeload.github.com/arnaucube/konstrui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661609,"owners_count":19676408,"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":["golang","template-engine","templating","web"],"created_at":"2024-11-07T18:23:30.050Z","updated_at":"2025-02-19T12:42:46.270Z","avatar_url":"https://github.com/arnaucube.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Konstrui [![Go Report Card](https://goreportcard.com/badge/github.com/arnaucode/konstrui)](https://goreportcard.com/report/github.com/arnaucode/konstrui)\n\nweb templating engine for static websites, written in Go lang\n\n\n![konstrui](https://raw.githubusercontent.com/arnaucode/konstrui/master/media/konstrui.png \"konstrui\")\n\n\n## Example\n\n#### See the full example on https://github.com/arnaucode/konstrui/tree/master/example\n\n\n- Simple project structure example:\n\n```\nwebInput/\n    konstruiConfig.json\n    index.html\n    templates/\n        userTemplate.html\n        userTemplate.json\n```\n\n- Set the html file:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n\n\u003ch1\u003eMy First Heading\u003c/h1\u003e\n\n\u003cp\u003eMy first paragraph.\u003c/p\u003e\n\n\u003ckonstrui-template html=\"templates/userTemplate.html\" data=\"templates/userTemplate.json\"\u003e\u003c/konstrui-template\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n\n- Set the template file:\n\n```html\n\u003cdiv class=\"class1\" id=\"user[[i]]\"\u003e\n    \u003cdiv id=\"username[[i]]\" class=\"class2\"\u003e{{username}}\u003c/div\u003e\n    \u003cdiv id=\"description[[i]]\" class=\"class2\"\u003e{{description}}\u003c/div\u003e\n    \u003cdiv class=\"class2\"\u003e{{phone}}\u003c/div\u003e\n\u003c/div\u003e\n```\n\n- Set the template data file:\n\n```json\n[{\n        \"username\": \"Michaela Doe\",\n        \"description\": \"Hi, I'm here to code\",\n        \"phone\": \"456456456\"\n    },\n    {\n        \"username\": \"John Doe\",\n        \"description\": \"Hi, I'm here\",\n        \"phone\": \"123456789\"\n    },\n    {\n        \"username\": \"Myself\",\n        \"description\": \"How are you\",\n        \"phone\": \"no phone\"\n    }\n]\n```\n\n- Set the configuration file konstruiConfig.json in the webInput directory:\n\n```json\n{\n    \"title\": \"Web example\",\n    \"author\": \"arnaucode\",\n    \"github\": \"github.com/arnaucode\",\n    \"website\": \"arnaucode.com\",\n    \"files\": [\n        \"index.html\",\n        \"projects.html\",\n        \"app.css\"\n    ]\n}\n```\n\n\n- Execute konstrui\n\n```\n./konstrui\n```\n\n- Output:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\n\u003cbody\u003e\n    \u003ch1\u003eHeading\u003c/h1\u003e\n    \u003cp\u003eParagraph.\u003c/p\u003e\n    \u003cdiv class=\"class1\" id=\"user0\"\u003e\n        \u003cdiv id=\"username0\" class=\"class2\"\u003eMichaela Doe\u003c/div\u003e\n        \u003cdiv id=\"description0\" class=\"class2\"\u003eHi, I'm here to code\u003c/div\u003e\n        \u003cdiv class=\"class2\"\u003e456456456\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"class1\" id=\"user1\"\u003e\n        \u003cdiv id=\"username1\" class=\"class2\"\u003eJohn Doe\u003c/div\u003e\n        \u003cdiv id=\"description1\" class=\"class2\"\u003eHi, I'm here\u003c/div\u003e\n        \u003cdiv class=\"class2\"\u003e123456789\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"class1\" id=\"user2\"\u003e\n        \u003cdiv id=\"username2\" class=\"class2\"\u003eMyself\u003c/div\u003e\n        \u003cdiv id=\"description2\" class=\"class2\"\u003eHow are you\u003c/div\u003e\n        \u003cdiv class=\"class2\"\u003eno phone\u003c/div\u003e\n    \u003c/div\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n\n\n## Features\n\nImport templates\n```html\n\u003ckonstrui-template html=\"template.html\" data=\"template.json\"\u003e\u003c/konstrui-template\u003e\n```\n\nLoad values:\n```html\n{{username}}\n```\n\nNumber of iterations:\n```html\nUser [[i]]\n```\n\nSubobjects:\n```html\n\u003cp konstrui-repeat=\"users\"\u003e\n    {{user.username}}\n\u003c/p\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnaucube%2Fkonstrui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnaucube%2Fkonstrui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnaucube%2Fkonstrui/lists"}