From d1c96d52b956717567dd6bbe74ebf2125ae7fbc2 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Wed, 10 Jan 2024 11:30:42 +0800 Subject: [PATCH] feat: live2d --- _config.yml | 10 ++++++++++ layout/_partial/after-footer.ejs | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/_config.yml b/_config.yml index d758be2..339b135 100644 --- a/_config.yml +++ b/_config.yml @@ -227,8 +227,15 @@ firework: # Experimental, may have a lot of bugs, open with caution! pjax: enable: false + +# Experimental serviceworker: enable: true + +# Experimental +live2d: + enable: false + # Dependent cdn links vendor: js: @@ -248,6 +255,9 @@ vendor: wow: https://unpkg.com/wowjs@1.1.3/dist/wow.min.js firework: https://www.unpkg.com/mouse-firework@0.0.3/dist/index.umd.js pjax: https://www.unpkg.com/theme-shokax-pjax@0.0.3/dist/index.umd.js + live2d: + base: https://fastly.jsdelivr.net/gh/MliKiowa/plugin-live2d/ + js: https://fastly.jsdelivr.net/gh/MliKiowa/plugin-live2d/js/live2d-autoload.js css: highlight: https://unpkg.com/typeface-source-code-pro@1.1.13/index.css fancybox: https://unpkg.com/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 3ad484f..c571cc5 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -204,3 +204,9 @@ <%- js('js/pjax.js') %> <% } %> +<% if (theme.live2d.enable){ %> + <%- js(theme.vendor.js.live2d.js) %> + +<% } %>