添加 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 %}
+6 -4
View File
@@ -46,10 +46,12 @@ layout: single
{% endfor %}
<script>
for (const settingItem of document.getElementsByClassName("setting-item")) {
settingItem.addEventListener("change", ({ target }) => settings.set(target.name, target.value));
settings.onChange(settingItem.name, (value) => settingItem.type === "radio" && (settingItem.checked = settingItem.value === value));
}
window.addEventListener("load", () => {
for (const settingItem of document.getElementsByClassName("setting-item")) {
settingItem.addEventListener("change", ({ target }) => settings.set(target.name, target.value));
settings.onChange(settingItem.name, (value) => settingItem.type === "radio" && (settingItem.checked = settingItem.value === value));
}
});
</script>
<style>.notice label input { display: inline }</style>