添加一种新的 frontmatter 格式 (#466)
continuous-integration/drone/push Build is passing

This commit is contained in:
neveler
2026-06-07 17:31:45 +08:00
committed by GitHub
parent aa9f72ebfe
commit 8898bb5997
17 changed files with 45 additions and 30 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
---
/* @frontmatter
layout: null
---
*/
(function () {
const PREFIX = "HMCL_DOCS_SETTINGS_", data = {}, bus = new EventTarget(), configs = /*{%comment%}*/{}/*{%endcomment%}*/ /**{{'/'}}{{ site.data.settings | jsonify }}/**/;
window.addEventListener("storage", ({ key, newValue }) => key !== null && key.startsWith(PREFIX) && newValue !== data[key] && bus.dispatchEvent(new CustomEvent(key, { detail: (data[key] = newValue) })));
+3 -2
View File
@@ -1,6 +1,7 @@
---
/* @frontmatter
layout: null
---
*/
window.addEventListener("DOMContentLoaded", function () {
var skinLink = document.getElementById("skin");
var darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)");