{{ include 'partials/head' }} {{~ # ============ Article JSON-LD ============ ~}} {{ if site.AiSchemaEnabled }} {{ end }} {{~ # ============ 解析 article_config,与默认主题字段对齐 ============ ~}} {{ cfg_sidebar = article_config.sidebar_content cfg_show_toc = !cfg_sidebar || cfg_sidebar.toc != false cfg_show_related = !cfg_sidebar || cfg_sidebar.related != false cfg_hot_mod = cfg_sidebar ? cfg_sidebar.hot : null cfg_show_hot = !cfg_hot_mod || cfg_hot_mod.enabled != false cfg_hot_title = (cfg_hot_mod && cfg_hot_mod.title ? cfg_hot_mod.title : "热门文章") cfg_latest_mod = cfg_sidebar ? cfg_sidebar.latest : null cfg_show_latest = cfg_latest_mod && cfg_latest_mod.enabled cfg_latest_title = (cfg_latest_mod && cfg_latest_mod.title ? cfg_latest_mod.title : "最新文章") cfg_cols_mod = cfg_sidebar ? cfg_sidebar.columns : null cfg_show_columns = cfg_cols_mod && cfg_cols_mod.enabled cfg_cols_title = (cfg_cols_mod && cfg_cols_mod.title ? cfg_cols_mod.title : "全部栏目") cfg_show_share = article_config.show_share != false cfg_show_decl = article_config.show_content_declaration != false cfg_show_recmd = article_config.show_recommended != false cfg_recmd_title = (article_config.recommended_title ?? "精选文章") # 服务端判别:文章正文是否含 h2/h3,用于决定 TOC 侧栏是否渲染,避免 x-show 闪烁与空占位 _content_str = article.Content ?? "" has_toc_headings = (string.contains _content_str " {{~ # ============ 面包屑 + 12 栅格统一容器(正文 col-8 + 侧栏 col-4)============ ~}}
{{ if current_column }} {{ current_column.Name }} {{ end }}

{{ article.Title }}

{{ if article.Description }}

{{ article.Description }}

{{ end }} {{ if article.CoverImageUrl }}
{{ article.Title }}
{{ end }}
{{ article.Content }}
{{ if cfg_show_decl && article.Declaration }}
内容声明
{{ article.Declaration }}
{{ end }} {{ if article.AuthorName && article.AuthorBio }}
{{ if article.AuthorAvatarUrl }}{{ article.AuthorName }}{{ else }}{{ article.AuthorName | string.slice 0 1 }}{{ end }}
{{ article.AuthorName }}

{{ article.AuthorBio }}

{{ end }} {{ if cfg_show_recmd && recommended_articles.size > 0 }}

{{ cfg_recmd_title }}

{{ for article in recommended_articles limit:3 }} {{ card_variant = 'grid' }} {{ include 'partials/article_card' }} {{ end }}
{{ end }}
{{~ # ============ 连续侧栏:目录 + 相关文章 + 热门 + 最新 + 全部栏目 ============ ~}} {{ has_related_block = cfg_show_related && related_articles && related_articles.size > 0 has_hot_block = cfg_show_hot && hot_articles && hot_articles.size > 0 has_latest_block = cfg_show_latest && recent_articles && recent_articles.size > 0 has_columns_block = cfg_show_columns && columns && columns.size > 0 has_sidebar_modules = has_related_block || has_hot_block || has_latest_block || has_columns_block }} {{ if show_toc || has_sidebar_modules }} {{ end }}
{{ include 'partials/footer' }}