{"id":16798452,"url":"https://github.com/flosch/pongo","last_synced_at":"2025-03-17T03:31:04.570Z","repository":{"id":4301557,"uuid":"5433252","full_name":"flosch/pongo","owner":"flosch","description":"A template engine which implements a Django-template-like syntax.","archived":false,"fork":false,"pushed_at":"2014-07-01T11:48:40.000Z","size":435,"stargazers_count":128,"open_issues_count":1,"forks_count":11,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-02-27T17:17:26.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.florian-schlachter.de/?tag=pongo","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jlevy/the-art-of-command-line","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flosch.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":"2012-08-16T00:27:53.000Z","updated_at":"2024-11-01T02:24:33.000Z","dependencies_parsed_at":"2022-08-28T11:51:38.686Z","dependency_job_id":null,"html_url":"https://github.com/flosch/pongo","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/flosch%2Fpongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosch%2Fpongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosch%2Fpongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flosch%2Fpongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flosch","download_url":"https://codeload.github.com/flosch/pongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841203,"owners_count":20356443,"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-10-13T09:25:40.855Z","updated_at":"2025-03-17T03:31:04.232Z","avatar_url":"https://github.com/flosch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/flosch/pongo?status.png)](https://godoc.org/github.com/flosch/pongo) [![Build Status](https://travis-ci.org/flosch/pongo.svg?branch=master)](https://travis-ci.org/flosch/pongo)\n\n**I deactivated the issue tracker and wiki pages for pongo. pongo won't receive bugfixes anymore. Please consider using the successor [pongo2](https://github.com/flosch/pongo2) instead. You can find [more information and a migration tutorial](http://www.florian-schlachter.de/post/pongo2/) on my website.**\n\npongo is a well-tested template engine which implements a [Django-template](https://docs.djangoproject.com/en/dev/topics/templates/)-like syntax.\n\nPlease have a look at the test (`template_test.go`) for examples.\n\n# A tiny example (template string)\n\n\tin := \"Hello {{ name|capitalize }}!\"\n\ttpl, err := pongo.FromString(\"mytemplatetest\", \u0026in, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tout, err := tpl.Execute(\u0026pongo.Context{\"name\": \"florian\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(*out) // Output: Hello Florian!\n\n# Example server-usage (template file)\n\n\tpackage main\n\t\n\timport (\n\t\t\"github.com/flosch/pongo\"\n\t\t\"net/http\"\n\t)\n\t\n\tvar tplExample = pongo.Must(pongo.FromFile(\"example.html\", nil))\n\t\n\tfunc examplePage(w http.ResponseWriter, r *http.Request) {\n\t\terr := tplExample.ExecuteRW(w, \u0026pongo.Context{\"query\": r.FormValue(\"query\")})\n\t\tif err != nil {\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t}\n\t}\n\t\n\tfunc main() {\n\t\thttp.HandleFunc(\"/\", examplePage)\n\t\thttp.ListenAndServe(\":8080\", nil)\n\t}\n\n# Documentation\n\nSee the wiki (work in progress) on GitHub for a documentation/reference:\n\n[https://github.com/flosch/pongo/wiki](https://github.com/flosch/pongo/wiki).\n\nWhile I'm working on the wiki content, GoPkgDoc shows a list of implemented filters/tags and an auto-generated documentation on how to use the simple API:\n\n[http://go.pkgdoc.org/github.com/flosch/pongo](http://go.pkgdoc.org/github.com/flosch/pongo)\n\nIt is possible to add your own filters/tags. See the `template_test.go` for example implementations.\n\n# Status\n\npongo is still in beta and has a very few known bugs (this is why the tests fail).\n\n# License\n\npongo is licensed under the MIT-license (see LICENSE file for more).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflosch%2Fpongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflosch%2Fpongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflosch%2Fpongo/lists"}