添加 post_process 插件 (#445)
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler
2026-05-21 09:38:54 +08:00
committed by GitHub
parent d7c2569844
commit 17d1ae9f05
5 changed files with 90 additions and 14 deletions
+5 -4
View File
@@ -5,10 +5,11 @@ layout: single
{{ 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 | jsonify }});{% endif -%}
window.addEventListener("load", () => {
{%- 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 | jsonify }});{% endif -%}
});
</script>
{% endif %}