{"id":18559150,"url":"https://github.com/linux-china/smarty4j","last_synced_at":"2025-07-13T15:37:38.907Z","repository":{"id":1742011,"uuid":"2567653","full_name":"linux-china/smarty4j","owner":"linux-china","description":"Smarty Template Engine for Java","archived":false,"fork":false,"pushed_at":"2011-10-19T03:38:18.000Z","size":305,"stargazers_count":23,"open_issues_count":0,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-02T02:51:13.853Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/linux-china.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}},"created_at":"2011-10-13T06:41:49.000Z","updated_at":"2024-07-03T01:34:59.000Z","dependencies_parsed_at":"2022-09-18T01:46:00.260Z","dependency_job_id":null,"html_url":"https://github.com/linux-china/smarty4j","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/linux-china%2Fsmarty4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fsmarty4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fsmarty4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fsmarty4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linux-china","download_url":"https://codeload.github.com/linux-china/smarty4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144159,"owners_count":21054876,"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":[],"created_at":"2024-11-06T21:42:10.213Z","updated_at":"2025-04-10T02:30:40.273Z","avatar_url":"https://github.com/linux-china.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction:\n\nSmarty4J is an template engine implemented by Java to deal with Smarty template. For Smarty please visit http://www.smarty.net\n\n## How to Use\n\n### Open your pom.xml and add:\n\n    \u003cdependency\u003e\n         \u003cgroupId\u003eorg.lilystudio\u003c/groupId\u003e\n         \u003cartifactId\u003esmarty4j\u003c/artifactId\u003e\n         \u003cversion\u003e1.0.1\u003c/version\u003e\n    \u003c/dependency\u003e\n\n### Example:\n\n        import junit.framework.TestCase;\n        import org.lilystudio.smarty4j.Context;\n        import org.lilystudio.smarty4j.Engine;\n        import org.lilystudio.smarty4j.Template;\n\n        import java.io.ByteArrayOutputStream;\n\n        /**\n         * smarty template test\n         */\n        public class SmartyTemplateTest extends TestCase {\n            /**\n             * smarty engine\n             */\n            private Engine smartyEngine = new Engine();\n\n            /**\n             * test to render smarty template\n             *\n             * @throws Exception exception\n             */\n            public void testRender() throws Exception {\n                Template template = smartyEngine.getTemplate(\"/src/test/resources/demo.tpl\");\n                Context context = new Context();\n                context.set(\"title\", \"欢迎光临！\");\n                ByteArrayOutputStream out = new ByteArrayOutputStream();\n                template.merge(context, out);\n                System.out.println(out.toString(\"utf-8\"));\n            }\n        }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fsmarty4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux-china%2Fsmarty4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fsmarty4j/lists"}