Skip to content

Commit

Permalink
fix: do not fetch contributors for uncommitted content (#111)
Browse files Browse the repository at this point in the history
You'll need to enable [GitInfo](https://gohugo.io/methods/page/gitinfo/) feature via setting the `enableGitInfo` parameter on configuration file or specify the `--enableGitInfo` flag to `hugo` command.

Closes #110
  • Loading branch information
razonyang authored Nov 13, 2024
1 parent 39d8ca4 commit 19950c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/hb/modules/revision/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{- $editURL = printf "https://github.com/%s/%s/edit/%s/%s" $params.repo_owner $params.repo_name $repoBranch $path }}
{{- $viewURL = printf "https://github.com/%s/%s/blob/%s/%s" $params.repo_owner $params.repo_name $repoBranch $path }}
{{- $historyURL = printf "https://github.com/%s/%s/commits/%s/%s" $params.repo_owner $params.repo_name $repoBranch $path }}
{{- if $showContributors }}
{{- if and $showContributors .GitInfo }}
{{- $opts := dict "key" $.Lastmod }}
{{- with getenv "GITHUB_TOKEN" }}
{{- $opts = merge $opts (dict "headers" (dict "Authorization" (printf "Bearer %s" .))) }}
Expand Down

0 comments on commit 19950c2

Please sign in to comment.