website/layouts/_default/single.html

33 lines
1,002 B
HTML
Raw Normal View History

2022-09-28 20:49:59 +00:00
{{ define "main" }}
<main class="page-container">
2022-09-28 20:49:59 +00:00
<article>
<h1>{{ .Title }}</h1>
{{ with .Date }}
<div>Publié le <b><time>{{ . | time.Format ":date_full" }}</time></b></div>
{{ end }}
{{ if .Params.featured_image }}
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
{{ if $featuredImage }}
{{ $featuredImage := $featuredImage.Resize "600x" }}
<figure>
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption>{{ . }}</figcaption>
{{ end }}
</figure>
{{ end }}
{{ end }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
2022-09-28 20:49:59 +00:00
<div>
{{ .Content }}
</div>
</article>
</main>
{{ end }}