{{ .Title }} {{- if .Draft }} [draft]{{- end }}
{{ .Summary | plainify | htmlUnescape | truncate 120 }}
{{- define "main" }} {{- $lang := .Lang }} {{- $isZh := eq $lang "zh" }} {{/* Aggregate ALL articles across all sections */}} {{- $allPages := where site.RegularPages "Lang" $lang }} {{- $allPages = where $allPages "Section" "in" (slice "ai-technology" "growth" "projects") }} {{- $allPages = $allPages.ByDate.Reverse }} {{- $totalCount := len $allPages }} {{/* Build tag frequency map */}} {{- $tagCounts := dict }} {{- range $allPages }} {{- range .Params.tags }} {{- $count := index $tagCounts . | default 0 }} {{- $tagCounts = merge $tagCounts (dict . (add $count 1)) }} {{- end }} {{- end }} {{/* Sort tags by frequency - collect top 15 */}} {{- $tagPairs := slice }} {{- range $tag, $count := $tagCounts }} {{- $tagPairs = $tagPairs | append (dict "tag" $tag "count" $count) }} {{- end }} {{- $sortedTags := sort $tagPairs "count" "desc" }} {{- $topTags := first 15 $sortedTags }} {{/* Section counts */}} {{- $aiTechCount := 0 }} {{- $growthCount := 0 }} {{- $projectsCount := 0 }} {{- range $allPages }} {{- if eq .Section "ai-technology" }} {{- $aiTechCount = add $aiTechCount 1 }} {{- else if eq .Section "growth" }} {{- $growthCount = add $growthCount 1 }} {{- else if eq .Section "projects" }} {{- $projectsCount = add $projectsCount 1 }} {{- end }} {{- end }} {{/* i18n labels */}} {{- $filterAllLabel := cond $isZh "全部" "All" }} {{- $filterCategoryLabel := cond $isZh "分类" "Category" }} {{- $filterTagsLabel := cond $isZh "标签" "Tags" }} {{- $filterSortLabel := cond $isZh "排序" "Sort" }} {{- $filterNewest := cond $isZh "最新优先" "Newest" }} {{- $filterOldest := cond $isZh "最早优先" "Oldest" }} {{- $filterClear := cond $isZh "清除筛选" "Clear" }} {{- $noResults := cond $isZh "没有匹配的文章" "No articles match your filters" }} {{- $articlesLabel := cond $isZh "篇文章" "articles" }}
{{ .Description }}
{{- end }}{{ .Summary | plainify | htmlUnescape | truncate 120 }}