{{- define "main" }} {{- $lang := .Lang }} {{- $isZh := eq $lang "zh" }} {{- $sectionPages := where .RegularPages "Lang" $lang }} {{- $aiTechPages := $sectionPages.ByDate.Reverse }} {{- $latestAll := first 6 $aiTechPages }} {{- $featuredPage := index $latestAll 0 }}
{{/* ── Hero ── */}}
{{- if $isZh }}AI 技术与工程{{ else }}AI Technology & Engineering{{ end }}

{{- if $isZh }} 构建 智能系统 {{- else }} Building Intelligent Systems {{- end }}

{{- if .Description }}{{ .Description | markdownify }} {{- else if $isZh }}深入探索大语言模型、Kubernetes 基础设施与 Go 后端工程,记录每一次构建与突破 {{- else }}Deep dives into LLMs, Kubernetes infrastructure, and Go backend engineering — documenting every build and breakthrough {{- end }}

{{ len $aiTechPages }} {{ if $isZh }}篇文章{{ else }}articles{{ end }} {{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }} {{- with .OutputFormats.Get "rss" }} RSS {{- end }}{{- end }}
{{/* ── Focus Areas ── */}} {{/* ── Featured + Grid ── */}} {{- if $latestAll }}
{{/* Featured Article */}} {{- if $featuredPage }} {{- end }} {{/* Article Grid */}}
{{- range $i, $p := $latestAll }} {{- if gt $i 0 }}
{{- with $p.Params.categories }} {{ index . 0 }} {{- end }}

{{ $p.Title }}

{{- if $p.Params.description }}

{{ $p.Params.description | plainify | truncate 90 }}

{{- end }}
{{- end }} {{- end }}
{{- end }} {{/* ── All Articles List ── */}}

{{ if $isZh }}全部文章{{ else }}All Articles{{ end }}

{{ len $aiTechPages }}
{{- $paginator := .Paginate $aiTechPages 20 }} {{- range $paginator.Pages }}
{{- with .Params.categories }} {{ index . 0 }} {{- end }}

{{ .Title }}

{{- if .Params.tags }}
{{- range first 3 .Params.tags }} {{ . }} {{- end }}
{{- end }}
{{- end }}
{{- if gt $paginator.TotalPages 1 }} {{- end }}
{{- end }}