优化 document 布局内容 (#423)
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler
2026-04-17 07:52:37 +08:00
committed by GitHub
parent 493d605495
commit 0907ca4b6e
5 changed files with 64 additions and 12 deletions
+9 -8
View File
@@ -2,12 +2,13 @@
layout: single
---
{% if jekyll.environment == 'production' and page.hits %}
<img src="https://hits.zkitefly.eu.org/?tag={{ page.url | absolute_url | url_encode }}" alt="Hits" decoding="async">
{% endif %}
<div class="notice--info">
<p>本文由 {{ page.author | default: '未署名用户' }} 创建{% if page.contributors %},并由 {{ page.contributors | join: ' ' }} 编辑{% endif %}。</p>
</div>
{{ content }}
{% if page.author or page.contributors or jekyll.environment == 'production' and page.hits %}
<script src="{{ '/assets/js/meta.js' | relative_url }}"></script>
<script>
{%- if page.author %}appendMeta("{{ page.author }}", "fas fa-user-pen");{% endif -%}
{%- for contributor in page.contributors %}appendMeta("{{ contributor }}", "fas fa-user-pen");{% endfor -%}
{%- if jekyll.environment == 'production' and page.hits %}hits("{{ page.url | absolute_url | url_encode }}");{% endif -%}
</script>
{% endif %}