{{- define "main" }} {{- $isZh := eq .Lang "zh" }} {{- $polarsteps := .Params.polarsteps_url | default "https://www.polarsteps.com/cubxxw" }} {{- $travelTags := slice "travel" "Travel" "Adventure" "旅行" "Exploration" "探索" "hiking" "Hiking" }} {{- $travelPages := slice }} {{- range .Site.RegularPages }} {{- if and (not .Params.Draft) (.Params.tags) }} {{- if gt (len (intersect .Params.tags $travelTags)) 0 }} {{- $travelPages = $travelPages | append . }} {{- end }} {{- end }} {{- end }} {{- $travelPages = sort $travelPages "Date" "desc" }} {{- $articleCount := len $travelPages }} {{- $allTags := slice }} {{- range $travelPages }} {{- range .Params.tags }}{{- $allTags = $allTags | append . }}{{- end }} {{- end }} {{- $uniqueTags := $allTags | uniq }}
{{/* ── Hero ── */}}
{{ if $isZh }}数字游民 · 探险者{{ else }}Digital Nomad · Explorer{{ end }}

{{- if $isZh }} 探索世界 记录足迹 {{- else }} Explore the World Leave Footprints {{- end }}

{{ if $isZh }}一步一个脚印,记录旅途中的真实故事与深度感悟{{ else }}One step at a time — real stories and deep reflections from the road{{ end }}

{{/* ── Stats ── */}} {{- if gt $articleCount 0 }}
{{ $articleCount }} {{ if $isZh }}旅行故事{{ else }}Stories{{ end }}
{{ len $uniqueTags }} {{ if $isZh }}探索主题{{ else }}Topics{{ end }}
{{- $startYear := now.Year }} {{- if $travelPages }} {{- $startYear = (index (sort $travelPages "Date" "asc") 0).Date.Year }} {{- end }} {{- $years := sub now.Year $startYear }}{{- if lt $years 1 }}{{- $years = 1 }}{{- end }}
{{ $years }}+ {{ if $isZh }}旅行年数{{ else }}Years{{ end }}
{{ if $isZh }}探索可能{{ else }}Possibilities{{ end }}
{{- end }} {{/* ── Travel Stories ── */}}
{{ if $isZh }}来自路上{{ else }}From the Road{{ end }}

{{ if $isZh }}旅行故事与记录{{ else }}Travel Stories & Journals{{ end }}

{{ if $isZh }}深度记录、真实感悟和实用指南{{ else }}Deep dives, honest reflections, and practical guides{{ end }}

{{- if gt $articleCount 0 }}
{{- range $i, $p := $travelPages }}
{{- with $p.Params.cover.image }}
{{ $p.Title }}
{{- end }}
{{- with $p.Params.tags }}
{{- range first 2 . }}{{ . }}{{- end }}
{{- end }}

{{ $p.Title }}

{{- with $p.Description }}{{ . | plainify | htmlUnescape | truncate 120 }} {{- else }}{{ $p.Summary | plainify | htmlUnescape | truncate 120 }} {{- end }}

{{ if $isZh }}阅读全文{{ else }}Read Story{{ end }}
{{- end }}
{{- else }}

{{ if $isZh }}旅行故事即将到来…{{ else }}Travel stories coming soon…{{ end }}

{{ if $isZh }}先去 Polarsteps 看看{{ else }}See Polarsteps for now{{ end }}
{{- end }}
{{/* ── Philosophy ── */}}
{{- if $isZh }}旅行不是逃离生活,而是让生活不会逃离你 {{- else }}Travel is not an escape from life — it's so life doesn't escape from you {{- end }}

{{ if $isZh }}真实连接{{ else }}Real Connection{{ end }}

{{ if $isZh }}与当地文化深度交流,而非走马观花{{ else }}Deep cultural exchange, not just sightseeing{{ end }}

{{ if $isZh }}慢旅行{{ else }}Slow Travel{{ end }}

{{ if $isZh }}驻留体验,不赶打卡,感受每个地方的节奏{{ else }}Stay longer, skip checklists, feel each place's rhythm{{ end }}

{{ if $isZh }}数字游民{{ else }}Digital Nomad{{ end }}

{{ if $isZh }}代码与旅途并行,世界是我的办公室{{ else }}Code and travel in parallel — the world is my office{{ end }}

{{/* ── Connect ── */}}

{{ if $isZh }}一起出发?{{ else }}Travel Together?{{ end }}

{{ if $isZh }}分享旅行技巧、交流冒险故事,或者讨论数字游民生活{{ else }}Share travel tips, exchange adventure stories, or discuss the nomad life{{ end }}

{{- end }}