Theme fest ins Repo uebernehmen statt als Submodule
Ein normaler git clone holt Submodules nicht mit - geprueft: nach dem Klonen des Repos war themes/gokarna leer. Portainer klont ebenso, der Build im Container waere also an dem fehlenden Theme gescheitert. Gokarna liegt jetzt direkt im Repo, festgeschrieben auf Commit 8306042, den Stand, mit dem die Seite bisher gebaut wurde. .gitmodules entfaellt. Nachteil: Theme-Updates muessen kuenftig von Hand eingespielt werden. Dafuer baut das Repo aus jedem beliebigen Klon heraus, ohne Sonderbehandlung. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
75
themes/gokarna/layouts/partials/post.html
Normal file
75
themes/gokarna/layouts/partials/post.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<div class="post container">
|
||||
<div class="post-header-section">
|
||||
<h1>{{ or (.Params.H1 | markdownify) (.Title | markdownify) }}</h1>
|
||||
|
||||
{{/* Determine whether to display the date & description based on tags */}}
|
||||
|
||||
{{ $displayDate := true }}
|
||||
{{ $displayDescription := true }}
|
||||
{{ $postTags := or .Params.Tags slice }}
|
||||
{{ $hiddenTags := or .Site.Params.Hidden.Tags slice }}
|
||||
{{ $tagsHidePostDate := or .Site.Params.Hidden.TagsPostDate slice }}
|
||||
{{ $tagsHidePostDescription := or .Site.Params.Hidden.TagsPostDescription slice }}
|
||||
|
||||
{{ if gt ($tagsHidePostDate | intersect $postTags | len) 0 }}
|
||||
{{ $displayDate = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt ($tagsHidePostDescription | intersect $postTags | len) 0 }}
|
||||
{{ $displayDescription = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $displayDescription }}
|
||||
<small role="doc-subtitle">{{ .Description }}</small>
|
||||
{{ end }}
|
||||
|
||||
{{ if $displayDate }}
|
||||
<p class="post-date">
|
||||
{{ if (eq .Site.Params.DisplayReadingTime true) }}
|
||||
{{ .ReadingTime }} min read |
|
||||
{{ end }}
|
||||
|
||||
{{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Date }}
|
||||
|
||||
{{ if lt .Date .Lastmod }}
|
||||
| Updated {{ dateFormat (or .Site.Params.dateFormat "January 2, 2006") .Lastmod }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
<ul class="post-tags">
|
||||
{{ range $tag := $postTags }}
|
||||
{{ if not (in $hiddenTags $tag) }}
|
||||
<li class="post-tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||
<div class="post-comments">
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="prev-next">
|
||||
{{ if (eq .Site.Params.TogglePreviousAndNextButtons true) }}
|
||||
{{ if or .PrevInSection .NextInSection }}
|
||||
{{ partial "prev-next.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Back to top button -->
|
||||
{{ if .Site.Params.ShowBackToTopButton }}
|
||||
{{ partial "back-to-top.html" . }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.CustomCommentHTML }}
|
||||
<div id="comments">
|
||||
{{ .Site.Params.CustomCommentHTML | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user