{"id":14967584,"url":"https://github.com/eknkc/pug","last_synced_at":"2025-10-25T20:31:30.453Z","repository":{"id":57497145,"uuid":"106015222","full_name":"eknkc/pug","owner":"eknkc","description":"Go port of Pug (jade) template engine","archived":false,"fork":false,"pushed_at":"2018-02-24T09:05:26.000Z","size":153,"stargazers_count":49,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T00:02:32.503Z","etag":null,"topics":["go","pug","tempalte"],"latest_commit_sha":null,"homepage":"","language":"Go","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/eknkc.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-10-06T14:38:47.000Z","updated_at":"2025-03-15T18:44:01.000Z","dependencies_parsed_at":"2022-09-03T23:51:33.763Z","dependency_job_id":null,"html_url":"https://github.com/eknkc/pug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eknkc/pug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eknkc%2Fpug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eknkc%2Fpug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eknkc%2Fpug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eknkc%2Fpug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eknkc","download_url":"https://codeload.github.com/eknkc/pug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eknkc%2Fpug/sbom","scorecard":{"id":370725,"data":{"date":"2025-08-11","repo":{"name":"github.com/eknkc/pug","commit":"607e1323ff9dd111a7216d9351e674d39a68025a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/23 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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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"}}]},"last_synced_at":"2025-08-18T12:51:24.020Z","repository_id":57497145,"created_at":"2025-08-18T12:51:24.020Z","updated_at":"2025-08-18T12:51:24.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281015495,"owners_count":26430095,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"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":["go","pug","tempalte"],"created_at":"2024-09-24T13:38:18.944Z","updated_at":"2025-10-25T20:31:30.152Z","avatar_url":"https://github.com/eknkc.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\n\n# pug\n`import \"github.com/eknkc/pug\"`\n\n* [Overview](#pkg-overview)\n* [Index](#pkg-index)\n* [Subdirectories](#pkg-subdirectories)\n\n## \u003ca name=\"pkg-overview\"\u003eOverview\u003c/a\u003e\nPackage pug.go is an elegant templating engine for Go Programming Language.\nIt is a port of Pug template engine, previously known as Jade.\n\nPug.go compiles .pug templates to standard go templates (\u003ca href=\"https://golang.org/pkg/html/template/\"\u003ehttps://golang.org/pkg/html/template/\u003c/a\u003e) and returns a `*template.Template` instance.\n\nWhile there is no JavaScript environment present, Pug.go provides basic expression support over go template syntax. Such as `a(href=\"/user/\" + UserId)` would concatenate two strings. You can use arithmetic, logical and comparison operators as well as ternery if operator.\n\nPlease check *Pug Language Reference* for details: \u003ca href=\"https://pugjs.org/api/getting-started.html\"\u003ehttps://pugjs.org/api/getting-started.html\u003c/a\u003e.\n\nDifferences between Pug and Pug.go (items with checkboxes are planned, just not present yet)\n\n- [ ] Multiline attributes are not supported\n- [ ] `\u0026attributes` syntax is not supported\n- [ ] `case` statement is not supported\n- [ ] Filters are not supported\n- [ ] Mixin rest arguments are not supported.\n- Mixin blocks are not supported. Go templates do not allow variable template includes so this is tricky.\n- `while` loops are not supported as Go templates do not provide it. We could use recursive templates or channel range loops etc but that would be unnecessary complexity.\n- Unbuffered code blocks are not possible as we don't have a JS environment. However it is possible to define variables using `- var x = \"foo\"` syntax as an exception.\n\nApart from these missing features, everything in the language reference should be supported.\n\n\n\n\n## \u003ca name=\"pkg-index\"\u003eIndex\u003c/a\u003e\n* [func CompileFile(filename string, options ...Options) (*template.Template, error)](#CompileFile)\n* [func CompileString(input string, options ...Options) (*template.Template, error)](#CompileString)\n* [func ParseFile(filename string, options ...Options) (string, error)](#ParseFile)\n* [func ParseString(input string, options ...Options) (string, error)](#ParseString)\n* [type Options](#Options)\n\n\n#### \u003ca name=\"pkg-files\"\u003ePackage files\u003c/a\u003e\n[doc.go](/src/github.com/eknkc/pug/doc.go) [pug.go](/src/github.com/eknkc/pug/pug.go) \n\n\n\n\n\n## \u003ca name=\"CompileFile\"\u003efunc\u003c/a\u003e [CompileFile](/src/target/pug.go?s=1524:1605#L52)\n``` go\nfunc CompileFile(filename string, options ...Options) (*template.Template, error)\n```\nParses and compiles the contents of supplied filename. Returns corresponding Go Template (html/templates) instance.\nNecessary runtime functions will be injected and the template will be ready to be executed\n\n\n\n## \u003ca name=\"CompileString\"\u003efunc\u003c/a\u003e [CompileString](/src/target/pug.go?s=2010:2090#L63)\n``` go\nfunc CompileString(input string, options ...Options) (*template.Template, error)\n```\nParses and compiles the supplied template string. Returns corresponding Go Template (html/templates) instance.\nNecessary runtime functions will be injected and the template will be ready to be executed\n\n\n\n## \u003ca name=\"ParseFile\"\u003efunc\u003c/a\u003e [ParseFile](/src/target/pug.go?s=2509:2576#L74)\n``` go\nfunc ParseFile(filename string, options ...Options) (string, error)\n```\nParses the contents of supplied filename template and return the Go Template source You would not be using this unless debugging / checking the output.\nPlease use Compile method to obtain a template instance directly\n\n\n\n## \u003ca name=\"ParseString\"\u003efunc\u003c/a\u003e [ParseString](/src/target/pug.go?s=2865:2931#L80)\n``` go\nfunc ParseString(input string, options ...Options) (string, error)\n```\nParses the supplied template string and return the Go Template source You would not be using this unless debugging / checking the output.\nPlease use Compile method to obtain a template instance directly\n\n\n\n\n## \u003ca name=\"Options\"\u003etype\u003c/a\u003e [Options](/src/target/pug.go?s=108:838#L10)\n``` go\ntype Options struct {\n    // Setting if pretty printing is enabled.\n    // Pretty printing ensures that the output html is properly indented and in human readable form.\n    // If disabled, produced HTML is compact. This might be more suitable in production environments.\n    // Default: false\n    PrettyPrint bool\n\n    // A Dir implements FileSystem using the native file system restricted to a specific directory tree.\n    //\n    // While the FileSystem.Open method takes '/'-separated paths, a Dir's string value is a filename on the native file system, not a URL, so it is separated by filepath.Separator, which isn't necessarily '/'.\n    // By default, a os package is used but you can supply a different filesystem using this option\n    Dir compiler.Dir\n}\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n- - -\nGenerated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feknkc%2Fpug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feknkc%2Fpug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feknkc%2Fpug/lists"}