{"id":16179849,"url":"https://github.com/bep/hugo-github","last_synced_at":"2025-04-07T11:46:56.176Z","repository":{"id":148328615,"uuid":"212363989","full_name":"bep/hugo-github","owner":"bep","description":"Some Hugo components talking to GitHub","archived":false,"fork":false,"pushed_at":"2019-10-02T15:33:19.000Z","size":3,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T14:41:37.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/bep.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}},"created_at":"2019-10-02T14:35:21.000Z","updated_at":"2022-10-22T09:16:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"feffa1de-9bb5-44a4-ae21-cbdede6037dc","html_url":"https://github.com/bep/hugo-github","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/bep%2Fhugo-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fhugo-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fhugo-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bep%2Fhugo-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bep","download_url":"https://codeload.github.com/bep/hugo-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648911,"owners_count":20972942,"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-10T05:44:09.058Z","updated_at":"2025-04-07T11:46:56.153Z","avatar_url":"https://github.com/bep.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo GitHub\n\nSome small (proof of concept) Hugo components talking to GitHub.\n\n\n\n## repo\n\nInclude it as a Hugo Component in your `module` config in `config.toml`:\n\n```\n[[module.imports]]\n    path=\"github.com/bep/hugo-github/repo\"\n```\n\nThen you can do something like this:\n\n\n```\n{{ $repo := \"gohugoio/hugo\" }}\n{{ $githubRepo := partialCached \"github/repo\" $repo $repo }}\n\n{{ range $k, $v :=  $githubRepo }}\n    Key: {{ $k }} Value: {{ $v }}\n{{ end }}\n```\n\nWhich will print out information about the given repo, including `stargazers_count`.\n\nThe last `$repo` argument above is the cache key. The above partial uses `getJSON` under the hood, so the result is also cached to disk, see https://gohugo.io/getting-started/configuration/#configure-file-caches for how to configure.\n\nRunning the above without any access token will soon get you over the GitHub rate limit. You can get by this by setting a `GITHUB_TOKEN` as an OS environment variable. Note that this token will be sent to GitHub as a request attribute (because of a limitation in Hugo), which is considered less secure than sending as a HTTP header, as it may show up in server logs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbep%2Fhugo-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbep%2Fhugo-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbep%2Fhugo-github/lists"}