mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
16 lines
409 B
JavaScript
16 lines
409 B
JavaScript
if (!window.NexT) window.NexT = {};
|
|
|
|
if (!window.CONFIG) {
|
|
window.CONFIG = JSON.parse(
|
|
document.querySelector('meta[name="hexo-config"]').content || '{}'
|
|
);
|
|
}
|
|
|
|
(() => {
|
|
document.querySelectorAll('meta[name^="hexo-config-"]')
|
|
.forEach(configMeta => {
|
|
const key = configMeta.name.slice('hexo-config-'.length);
|
|
window.CONFIG[key] = JSON.parse(configMeta.content || '{}');
|
|
});
|
|
})();
|