mirror of
https://gitlab.com/fabinfra/fabinfra-theme.git
synced 2025-03-12 22:51:49 +01:00
36 lines
1.3 KiB
HTML
36 lines
1.3 KiB
HTML
<div class="item">
|
|
|
|
{{ $.Scratch.Set "link" .RelPermalink }}
|
|
{{ with .Params.repo }}
|
|
{{ $repoHost := default "github" $.Params.repoHost }}
|
|
{{ if eq "github" $repoHost }}
|
|
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
|
{{ else if eq "gitlab" $repoHost }}
|
|
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
|
{{ else if eq "bitbucket" $repoHost }}
|
|
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
|
|
|
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
|
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
|
|
|
|
|
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
|
<h5>{{ $.Scratch.Get "pub_date" }}</h5>
|
|
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
|
{{ range.Params.categories }}
|
|
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
<kbd class="item-cat"> {{ . }} </kbd>
|
|
</a>
|
|
{{ end }}
|
|
{{ range .Params.tags }}
|
|
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
<kbd class="item-tag"> {{ . }} </kbd>
|
|
</a>
|
|
{{ end }}
|
|
|
|
</div>
|
|
|