Compare commits
No commits in common. "master" and "master" have entirely different histories.
|
@ -1,17 +1,11 @@
|
|||
|
||||
{{/*
|
||||
S'il n'y a pas de / dans l'url d'une image alors on ajoute le path de l'article
|
||||
*/}}
|
||||
{{ $path := cond (in .Destination "/") .Destination (path.Join "/" .Page.File.Dir .Destination) }}
|
||||
{{ if ne (substr $path -3 3) "svg" }}
|
||||
{{ $image := .Page.Resources.GetMatch (printf "*%s*" .Destination) }}
|
||||
{{ with $image }}
|
||||
{{ $maxWidth := (default "610" site.Params.ImageWidth) }}
|
||||
{{ if gt $image.Width $maxWidth }}
|
||||
{{ $resizeParams := delimit (slice (default "610x" site.Params.ImageSize) (default "q100" site.Params.ImageQuality) (default "webp" site.Params.ImageFormat)) " " }}
|
||||
{{ $resized := $image.Resize (string $resizeParams) }}
|
||||
{{ $path = $resized.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $resizeParams := delimit (slice (default "610x" site.Params.ImageSize) (default "q100" site.Params.ImageQuality) (default "webp" site.Params.ImageFormat)) " " }}
|
||||
{{ $resized := $image.Resize (string $resizeParams) }}
|
||||
{{ $path = $resized.RelPermalink }}
|
||||
{{ end }}
|
||||
<img src="{{ $path | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} loading="lazy" />
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"data" : {{ block "response" .}}{{ end }}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"name": "{{ .Title }}",
|
||||
"permalink" : "{{ .Permalink }}"
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{{ define "response" }}
|
||||
[
|
||||
{{ range $index, $e := .Data.Pages }}
|
||||
{{ if $index }}, {{ end }}{{ .Render "item" }}
|
||||
{{ end }}
|
||||
]
|
||||
{{ end }}
|
|
@ -1 +0,0 @@
|
|||
{{ define "response" }} {{ .Render "item" }} {{ end }}
|
|
@ -4,7 +4,7 @@
|
|||
{{- if strings.HasPrefix $tel $protocol -}}
|
||||
{{- $tel = substr $tel 4 -}}
|
||||
{{- else -}}
|
||||
{{- $telWithProtocol = print $protocol ":" (replace $tel " " "") -}}
|
||||
{{- $telWithProtocol := print $protocol ":" (replace $tel " " "") -}}
|
||||
{{- end -}}
|
||||
<a
|
||||
class="tel obfuscate"
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{{ if or (eq hugo.Environment "production") (eq hugo.Environment "staging") }}
|
||||
<script async defer data-api="/api/event" data-domain="{{ (urls.Parse .Site.BaseURL).Host }}" src="/js/script.js"></script>
|
||||
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
|
||||
{{ end }}
|
|
@ -28,7 +28,7 @@
|
|||
<meta name="twitter:title" content="{{ default .Site.Title .Title }}" />
|
||||
<meta name="twitter:description" content="{{ $.Site.Params.description }}" />
|
||||
<meta name="twitter:url" content="{{ .Site.BaseURL }}" />
|
||||
<meta name="twitter:image" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
|
||||
<meta name="twitter:image:src" content="{{ .Site.BaseURL}}{{ .Site.Params.SocialImage }}" />
|
||||
{{ else }}
|
||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
|
@ -45,9 +45,9 @@
|
|||
{{ end }}
|
||||
<meta name="twitter:url" content="{{ .Permalink }}" />
|
||||
{{ if .Params.SocialImage }}
|
||||
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" />
|
||||
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}{{ .Params.SocialImage }}" />
|
||||
{{ else }}
|
||||
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Site.Params.SocialImage }}" />
|
||||
<meta name="twitter:image:src" content="{{ .Site.Params.SocialImage }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
|
@ -57,13 +57,3 @@
|
|||
{{ else }}
|
||||
<meta name="keywords" content="{{ $.Site.Params.Keywords }}" />
|
||||
{{ end }}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org/",
|
||||
"@type": "WebSite",
|
||||
"name": "{{ default .Site.Title .Title }}",
|
||||
"image": "{{ .Site.BaseURL}}{{ default .Site.Params.SocialImage .Params.SocialImage }}",
|
||||
"about": "{{ .Site.Params.description }}"
|
||||
}
|
||||
</script>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
|
@ -4,12 +4,12 @@
|
|||
"author": "Simon <simon@lamelio.fr>",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@resilien/directus-to-markdown": "1.2.0",
|
||||
"@resilien/directus-to-markdown": "^0.2.0",
|
||||
"imagemin-cli": "^6.0.0",
|
||||
"imagemin-webp": "^6.0.0",
|
||||
"richtypo": "4.1.9",
|
||||
"richtypo-rules-common": "4.1.8",
|
||||
"richtypo-rules-fr": "4.0.11",
|
||||
"url-slug": "3.0.3"
|
||||
"richtypo": "4.0.7",
|
||||
"richtypo-rules-common": "4.0.2",
|
||||
"richtypo-rules-fr": "4.0.2",
|
||||
"url-slug": "^3.0.2"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue