diff --git a/src/DjangoBlog-master/templates/blog/tags/article_info.html b/src/DjangoBlog-master/templates/blog/tags/article_info.html index 3deec44..31fce0b 100644 --- a/src/DjangoBlog-master/templates/blog/tags/article_info.html +++ b/src/DjangoBlog-master/templates/blog/tags/article_info.html @@ -4,71 +4,78 @@
- + {# 文章标题 #}

- {% if isindex %} + {% if isindex %} {% if article.article_order > 0 %} + {# 置顶文章显示特殊标识 #} 【{% trans 'pin to top' %}】{{ article.title }} {% else %} + {# 普通文章标题链接 #} {{ article.title }} {% endif %} - {% else %} + {# 文章详情页直接显示标题 #} {{ article.title }} {% endif %}

+ + {# 评论链接和浏览量 #}
+ + {# 面包屑导航(仅文章类型且非首页) #} {% if article.type == 'a' %} {% if not isindex %} - {% cache 36000 breadcrumb article.pk %} - {% load_breadcrumb article %} + {% cache 36000 breadcrumb article.pk %} {# 缓存面包屑10小时 #} + {% load_breadcrumb article %} {# 加载面包屑导航 #} {% endcache %} {% endif %} {% endif %}
- {% if isindex %} - {{ article.body|custom_markdown|escape|truncatechars_content }} -

Read more

+ {% if isindex %} + {# 首页文章摘要 #} + {{ article.body|custom_markdown|escape|truncatechars_content }} {# 截断显示 #} +

Read more

{# 阅读更多链接 #} {% else %} - + {# 文章详情页内容 #} {% if article.show_toc %} + {# 显示文章目录 #} {% get_markdown_toc article.body as toc %} {% trans 'toc' %}: - {{ toc|safe }} - -
+ {{ toc|safe }} {# 安全渲染HTML目录 #} +
{# 分隔线 #} {% endif %}
- - {{ article.body|custom_markdown|escape }} - + {# 完整文章内容 #} + {{ article.body|custom_markdown|escape }} {# 渲染Markdown内容 #}
{% endif %} -
+ {# 加载文章元数据(标签、分类等) #} {% load_article_metas article user %}
\ No newline at end of file