vmems-website/layouts/_default/single.html
Matthieu Bessat 96265bfbf3
All checks were successful
Deploy workflow / deploy (push) Successful in 13s
feat(SEO): add Json-LD meta and tags
2024-09-03 23:59:29 +02:00

45 lines
1.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ define "main" }}
<main class="container">
<article class="article">
<h1 class="page-title">{{ .Title }}</h1>
<p class="text-small">
{{ with .Date }}
<span>Publié le <b><time>{{ . | time.Format ":date_full" }}</time></b>,</span>
{{ end }}
{{ with .Lastmod }}
<span>Mis à jour le <b><time>{{ . | time.Format ":date_full" }}</time></b></span>
{{ end }}
</p>
<p class="article__tags">
{{- range $index, $element := .Params.tags -}}
{{- with $element -}}
<span>{{- if $index -}}, {{- end -}}</span>
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{- end -}}
{{ end }}
</p>
{{ if .Params.featured_image }}
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "900x" }}
<figure class="figure" style="max-width: 600px">
<img class="figure-img img-fluid" alt="" src="{{ $featuredImage.RelPermalink }}" />
{{ with .Params.featured_image.caption }}
<figcaption class="figure-caption">{{ . }}</figcaption>
{{ end }}
</figure>
{{ end }}
{{ end }}
<div class="article__text">
{{ .Content }}
</div>
</article>
</main>
{{ end }}