1
1
<!DOCTYPE html>
2
2
< html lang ="en ">
3
+
3
4
< head >
4
5
< meta charset ="UTF-8 ">
5
6
< title > Node.js Undici</ title >
9
10
< link rel ="stylesheet " href ="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css ">
10
11
< link rel ="icon " type ="image/png " href ="https://nodejs.org/static/images/favicons/favicon.png " />
11
12
</ head >
13
+
12
14
< body >
13
15
< div id ="app "> </ div >
14
16
< script >
32
34
noCompileLinks : [
33
35
'benchmarks/.*'
34
36
] ,
37
+ copyCode : {
38
+ buttonText : 'Copy Code' ,
39
+ errorText : 'Error' ,
40
+ successText : 'Copied' ,
41
+ } ,
35
42
relativePath : true ,
36
43
markdown : {
37
44
renderer : {
73
80
<!-- Docsify v4 -->
74
81
< script src ="//cdn.jsdelivr.net/npm/docsify@4 "> </ script >
75
82
< script src ="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js "> </ script >
83
+ < script src ="https://unpkg.com/docsify-copy-code@3 "> </ script >
76
84
< script type ="module ">
77
85
import mermaid from "//cdn.jsdelivr.net/npm/[email protected] /+esm" ;
78
86
mermaid . initialize ( { startOnLoad : true } ) ;
81
89
< script >
82
90
const plugin = ( config ) => ( hook ) => {
83
91
hook . afterEach ( ( html , next ) => {
84
- const container = document . createElement ( 'div' ) ;
85
- container . innerHTML = html ;
92
+ const container = document . createElement ( 'div' ) ;
93
+ container . innerHTML = html ;
86
94
87
- const elements = container . querySelectorAll ( 'pre[data-lang=mermaid]' )
88
- for ( const element of elements ) {
89
- const replacement = document . createElement ( 'div' ) ;
90
- replacement . textContent = element . textContent ;
91
- replacement . classList . add ( 'mermaid' ) ;
92
- element . parentNode . replaceChild ( replacement , element ) ;
93
- }
95
+ const elements = container . querySelectorAll ( 'pre[data-lang=mermaid]' )
96
+ for ( const element of elements ) {
97
+ const replacement = document . createElement ( 'div' ) ;
98
+ replacement . textContent = element . textContent ;
99
+ replacement . classList . add ( 'mermaid' ) ;
100
+ element . parentNode . replaceChild ( replacement , element ) ;
101
+ }
94
102
95
- next ( container . innerHTML ) ;
103
+ next ( container . innerHTML ) ;
96
104
} ) ;
97
105
98
106
hook . doneEach ( ( ) => mermaid . run ( config ) ) ;
104
112
window . $docsify . plugins . push ( plugin ( window . $docsify . mermaidConfig || { querySelector : ".mermaid" } ) ) ;
105
113
</ script >
106
114
</ body >
107
- </ html >
115
+
116
+ </ html >
0 commit comments