您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

list-item.html 1.0KB

1234567891011121314151617181920212223
  1. <div class="item">
  2. {{ $.Scratch.Set "link" .RelPermalink }}
  3. {{ with .Params.repo }}
  4. {{ $repoHost := default "github" $.Params.repoHost }}
  5. {{ if eq "github" $repoHost }}
  6. {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
  7. {{ else if eq "gitlab" $repoHost }}
  8. {{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
  9. {{ else if eq "bitbucket" $repoHost }}
  10. {{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
  11. {{ end }}
  12. {{ end }}
  13. {{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
  14. {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subheader" }}
  15. {{ with .Description }} {{ $.Scratch.Set "subheader" . }} {{ end }}
  16. <h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
  17. <h5>{{ $.Scratch.Get "subheader" }}</h5>
  18. {{ partial "tags" . }}
  19. </div>