{"id":13794004,"url":"https://github.com/gin-contrib/multitemplate","last_synced_at":"2026-04-02T16:19:07.034Z","repository":{"id":14308275,"uuid":"76309431","full_name":"gin-contrib/multitemplate","owner":"gin-contrib","description":"This is a custom HTML render to support multi templates","archived":false,"fork":false,"pushed_at":"2026-03-28T04:11:06.000Z","size":165,"stargazers_count":268,"open_issues_count":16,"forks_count":43,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-03-28T09:10:32.505Z","etag":null,"topics":["gin-gonic","golang","temlpate"],"latest_commit_sha":null,"homepage":null,"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/gin-contrib.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-12-13T01:03:41.000Z","updated_at":"2026-03-28T04:11:10.000Z","dependencies_parsed_at":"2024-01-13T10:13:46.090Z","dependency_job_id":"28432528-949d-45f7-9e14-a580684dbc52","html_url":"https://github.com/gin-contrib/multitemplate","commit_stats":{"total_commits":84,"total_committers":10,"mean_commits":8.4,"dds":"0.26190476190476186","last_synced_commit":"bcfbd485541b2252d833b346379b21ba969d9353"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/gin-contrib/multitemplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fmultitemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fmultitemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fmultitemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fmultitemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gin-contrib","download_url":"https://codeload.github.com/gin-contrib/multitemplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gin-contrib%2Fmultitemplate/sbom","scorecard":{"id":427165,"data":{"date":"2025-08-11","repo":{"name":"github.com/gin-contrib/multitemplate","commit":"c3de54cbc29ed0426fa502f167e57e1dee28b8ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Maintained","score":0,"reason":"1 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bearer.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/bearer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bearer.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/bearer.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/bearer.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/bearer.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/goreleaser.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/goreleaser.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gin-contrib/multitemplate/goreleaser.yml/master?enable=pin","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:29","Info: topLevel 'contents' permission set to 'read': .github/workflows/bearer.yml:8","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/goreleaser.yml:9","Info: no jobLevel write permissions found"],"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":"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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/goreleaser.yml:12"],"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":"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"}},{"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":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 2 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T02:28:36.910Z","repository_id":14308275,"created_at":"2025-08-19T02:28:36.910Z","updated_at":"2025-08-19T02:28:36.910Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gin-gonic","golang","temlpate"],"created_at":"2024-08-03T23:00:34.528Z","updated_at":"2026-04-02T16:19:07.020Z","avatar_url":"https://github.com/gin-contrib.png","language":"Go","readme":"# Multitemplate\n\n[![Run Tests](https://github.com/gin-contrib/multitemplate/actions/workflows/go.yml/badge.svg)](https://github.com/gin-contrib/multitemplate/actions/workflows/go.yml)\n[![Trivy Security Scan](https://github.com/gin-contrib/multitemplate/actions/workflows/trivy-scan.yml/badge.svg)](https://github.com/gin-contrib/multitemplate/actions/workflows/trivy-scan.yml)\n[![codecov](https://codecov.io/gh/gin-contrib/multitemplate/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-contrib/multitemplate)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/multitemplate)](https://goreportcard.com/report/github.com/gin-contrib/multitemplate)\n[![GoDoc](https://godoc.org/github.com/gin-contrib/multitemplate?status.svg)](https://godoc.org/github.com/gin-contrib/multitemplate)\n\nThis is a custom HTML render to support multi templates, ie. more than one `*template.Template`.\n\n## Usage\n\n### Start using it\n\nDownload and install it:\n\n```sh\ngo get github.com/gin-contrib/multitemplate\n```\n\nImport it in your code:\n\n```go\nimport \"github.com/gin-contrib/multitemplate\"\n```\n\n### Simple example\n\nSee [example/simple/example.go](example/simple/example.go)\n\n```go\npackage main\n\nimport (\n  \"github.com/gin-contrib/multitemplate\"\n  \"github.com/gin-gonic/gin\"\n)\n\nfunc createMyRender() multitemplate.Renderer {\n  r := multitemplate.NewRenderer()\n  r.AddFromFiles(\"index\", \"templates/base.html\", \"templates/index.html\")\n  r.AddFromFiles(\"article\", \"templates/base.html\", \"templates/index.html\", \"templates/article.html\")\n  return r\n}\n\nfunc main() {\n  router := gin.Default()\n  router.HTMLRender = createMyRender()\n  router.GET(\"/\", func(c *gin.Context) {\n    c.HTML(200, \"index\", gin.H{\n      \"title\": \"Html5 Template Engine\",\n    })\n  })\n  router.GET(\"/article\", func(c *gin.Context) {\n    c.HTML(200, \"article\", gin.H{\n      \"title\": \"Html5 Article Engine\",\n    })\n  })\n  router.Run(\":8080\")\n}\n```\n\n### Advanced example\n\n[Approximating html/template Inheritance](https://elithrar.github.io/article/approximating-html-template-inheritance/)\n\nSee [example/advanced/example.go](example/advanced/example.go)\n\n```go\npackage main\n\nimport (\n  \"path/filepath\"\n\n  \"github.com/gin-contrib/multitemplate\"\n  \"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n  router := gin.Default()\n  router.HTMLRender = loadTemplates(\"./templates\")\n  router.GET(\"/\", func(c *gin.Context) {\n    c.HTML(200, \"index.html\", gin.H{\n      \"title\": \"Welcome!\",\n    })\n  })\n  router.GET(\"/article\", func(c *gin.Context) {\n    c.HTML(200, \"article.html\", gin.H{\n      \"title\": \"Html5 Article Engine\",\n    })\n  })\n\n  router.Run(\":8080\")\n}\n\nfunc loadTemplates(templatesDir string) multitemplate.Renderer {\n  r := multitemplate.NewRenderer()\n\n  layouts, err := filepath.Glob(templatesDir + \"/layouts/*.html\")\n  if err != nil {\n    panic(err.Error())\n  }\n\n  includes, err := filepath.Glob(templatesDir + \"/includes/*.html\")\n  if err != nil {\n    panic(err.Error())\n  }\n\n  // Generate our templates map from our layouts/ and includes/ directories\n  for _, include := range includes {\n    layoutCopy := make([]string, len(layouts))\n    copy(layoutCopy, layouts)\n    files := append(layoutCopy, include)\n    r.AddFromFiles(filepath.Base(include), files...)\n  }\n  return r\n}\n```\n","funding_links":[],"categories":["Middlewares","Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-contrib%2Fmultitemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgin-contrib%2Fmultitemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgin-contrib%2Fmultitemplate/lists"}