We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a8c468 commit 45f8b37Copy full SHA for 45f8b37
2 files changed
src/pages/info/index.md
@@ -17,6 +17,8 @@ Docusaurus 3.9.2
17
18
\+ Docusaurus Search Local 2.0.1
19
20
+\+ Live2D Widget 1.0.0
21
+
22
## Date of Creation
23
24
 y  m  d
src/theme/Root.js
@@ -0,0 +1,16 @@
1
+import React, { useEffect } from 'react';
2
3
+export default function Root({ children }) {
4
+ useEffect(() => {
5
+ const script = document.createElement('script');
6
+ script.src = 'https://fastly.jsdelivr.net/npm/live2d-widgets@1.0.0/dist/autoload.js';
7
+ script.async = true;
8
+ document.body.appendChild(script);
9
10
+ return () => {
11
+ document.body.removeChild(script);
12
+ };
13
+ }, []);
14
15
+ return <>{children}</>;
16
+}
0 commit comments