Remove single layout template and update metadata display settings in Markdown syntax guide

This commit is contained in:
2025-08-12 21:36:49 +02:00
parent c839ee29e7
commit 331e72fc5f
2 changed files with 7 additions and 42 deletions

View File

@@ -14,6 +14,13 @@ categories = [
]
series = ["Themes Guide"]
aliases = ["migrate-from-jekyl"]
showMetadata = true # Master switch
showPublishedDate = false # Hide published date for this post
showReadingTime = false # Hide reading time for this post
showTags = false # Show tags
showAuthors = true # Hide authors
showCategories = false # Show categories
+++
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.

View File

@@ -1,42 +0,0 @@
{{ define "title"}}
{{ .Title }} | {{ .Site.Params.author.name }}
{{ end }}
{{ define "main" }}
<div class="postWrapper">
<h1>{{ .Title }}</h1>
{{ if .Description}}
<p>{{.Description}}</p>
{{ end }}
{{ if .Params.showMetadata | default true }}
<section class="postMetadata">
<dl>
{{ with .GetTerms "tags" }}
{{ partial "taxonomy/tags.html" . }}
{{ end }}
{{ with .GetTerms "authors" }}
{{ partial "taxonomy/authors.html" . }}
{{ end }}
{{ with .GetTerms "categories" }}
{{ partial "taxonomy/categories.html" . }}
{{ end }}
{{ if .Site.Params.published | default true }}
<dt>{{ i18n "published" }}</dt>
{{ $formattedDate := .Date.Format "2006-01-02" }}
<dd><time datetime="{{ $formattedDate }}">{{ .Date | time.Format ":date_long" }}</time></dd>
{{ end }}
{{ if .Site.Params.readingTime | default true }}
<dt>{{ i18n "reading_time" }}</dt>
<dd>{{ i18n "reading_time_desc" .ReadingTime }}</dd>
{{ end }}
</dl>
</section>
{{ end }}
<div>
{{ .Content }}
</div>
<div>
{{ template "_internal/disqus.html" . }}
</div>
</div>
{{ end }}