feat: add landing layout and harden rendering

This commit is contained in:
Friday authored and Nuno C. committed 2026-08-17 20:19:02 +01:00
1 parent 405c905754
commit 345f806d80
24 files changed
+353 -193

No files matched your search

@@ -76,7 +76,9 @@
{{ with $featured }}
{{ $featuredURL = .RelPermalink }}
{{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }}
{{ $featuredURL = (.Resize "600x").RelPermalink }}
{{ with try (.Resize "600x") }}
{{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
@@ -50,7 +50,9 @@
{{ with $featured }}
{{ $featuredURL = .RelPermalink }}
{{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }}
{{ $featuredURL = (.Resize "600x").RelPermalink }}
{{ with try (.Resize "600x") }}
{{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
+3 -1
View File
@@ -53,7 +53,9 @@
{{ with $featured }}
{{ $featuredURL = .RelPermalink }}
{{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }}
{{ $featuredURL = (.Resize "600x").RelPermalink }}
{{ with try (.Resize "600x") }}
{{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
+3 -1
View File
@@ -69,7 +69,9 @@
{{ with $featured }}
{{ $featuredURL = .RelPermalink }}
{{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }}
{{ $featuredURL = (.Resize "600x").RelPermalink }}
{{ with try (.Resize "600x") }}
{{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
+3 -1
View File
@@ -186,7 +186,9 @@
{{ if .Site.Params.rtl | default false }}
{{ $jsResources = $jsResources | append (resources.Get "js/rtl.js") }}
{{ end }}
{{ $jsResources = $jsResources | append (resources.Get "js/katex-render.js") }}
{{ if .Page.HasShortcode "katex" }}
{{ $jsResources = $jsResources | append (resources.Get "js/katex-render.js") }}
{{ end }}
{{ $jsResources = $jsResources | append (resources.Get "js/print-support.js") }}
{{ $jsResources = $jsResources | append (resources.Get "js/email.js") }}
{{ if $jsResources }}
+23
View File
@@ -0,0 +1,23 @@
<article class="relative isolate overflow-hidden">
<div aria-hidden="true" class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80">
<div class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-primary-400 to-secondary-500 opacity-20 sm:left-[calc(50%-30rem)] sm:w-[72rem]"></div>
</div>
<section class="mx-auto max-w-7xl px-4 pb-16 pt-12 sm:px-6 sm:pb-24 sm:pt-20 lg:px-8">
<div class="mx-auto max-w-4xl text-center">
{{ with .Site.Params.Author.name }}
<p class="mb-5 text-sm font-bold uppercase tracking-[0.18em] text-primary-600 dark:text-primary-400">{{ . }}</p>
{{ end }}
{{ with .Title }}
<h1 class="text-balance text-5xl font-black tracking-tight text-neutral-950 dark:text-white sm:text-7xl">{{ . | emojify }}</h1>
{{ end }}
<section class="prose prose-lg mx-auto mt-6 max-w-3xl text-left dark:prose-invert sm:text-center">{{ .Content }}</section>
</div>
</section>
</article>
<section class="border-t border-neutral-200 bg-neutral-50/70 py-12 dark:border-neutral-800 dark:bg-neutral-900/40">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
{{ partial "recent-articles/main.html" . }}
</div>
</section>
+1 -1
View File
@@ -60,7 +60,7 @@
{{ with .Params.tags }}"keywords": {{ . }},{{ end }}
{{ end }}
"mainEntityOfPage": {{ .Permalink }},
"wordCount": "{{ .WordCount }}"
"wordCount": {{ .WordCount | int }}
}{{ if site.Params.enableStructuredBreadcrumbs | default false }},
{
"@context": "https://schema.org",
+3 -1
View File
@@ -27,7 +27,9 @@
{{ with $featured }}
{{ $featuredURL = .RelPermalink }}
{{ if not (or $disableImageOptimization (eq .MediaType.SubType "svg")) }}
{{ $featuredURL = (.Resize "600x").RelPermalink }}
{{ with try (.Resize "600x") }}
{{ with .Value }}{{ $featuredURL = .RelPermalink }}{{ end }}
{{ end }}
{{ end }}
{{ end }}
+6 -1
View File
@@ -5,7 +5,12 @@
{{- $isMarkdown := or (eq $md true) (eq $md "true") -}}
{{- $content := .Inner -}}
{{- if $isMarkdown -}}
{{- $content = .InnerDeindent | strings.TrimSpace | .Page.RenderString -}}
{{- $content = .InnerDeindent | strings.TrimSpace -}}
{{- if not (strings.HasPrefix $content "<") -}}
{{- $content = $content | .Page.RenderString -}}
{{- else -}}
{{- $content = $content | safeHTML -}}
{{- end -}}
{{- end -}}
{{- $tabs := .Parent.Store.Get "tabs" | default slice -}}