@diplodoc/cli-tests 4.60.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/e2e/__snapshots__/include-toc.test.ts.snap +106 -106
- package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +293 -344
- package/e2e/__snapshots__/metadata.spec.ts.snap +119 -144
- package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
- package/e2e/__snapshots__/regression.test.ts.snap +904 -715
- package/e2e/__snapshots__/restricted-access.test.ts.snap +234 -0
- package/e2e/__snapshots__/rtl.spec.ts.snap +248 -302
- package/e2e/__snapshots__/translation.spec.ts.snap +366 -0
- package/e2e/errors.spec.ts +31 -0
- package/e2e/regression.test.ts +7 -2
- package/e2e/restricted-access.test.ts +21 -0
- package/e2e/translation.spec.ts +1 -1
- package/fixtures/cliAdapter.ts +41 -20
- package/fixtures/runners/binary.ts +18 -3
- package/fixtures/runners/source.ts +5 -5
- package/fixtures/runners/types.ts +7 -1
- package/fixtures/utils/file.ts +3 -3
- package/fixtures/utils/test.ts +6 -1
- package/mocks/errors/unreachable-link/input/exists.md +1 -0
- package/mocks/errors/unreachable-link/input/index.md +2 -0
- package/mocks/errors/unreachable-link/input/toc.yaml +1 -0
- package/mocks/include-toc/test6/input/toc.yaml +1 -0
- package/mocks/regression/input/1.md +2 -0
- package/mocks/regression/input/generic/1.md +3 -0
- package/mocks/regression/input/generic/2.md +3 -0
- package/mocks/regression/input/generic/3.md +1 -0
- package/mocks/regression/input/generic/Sub notes/1.md +3 -0
- package/mocks/regression/input/generic/Sub notes/2.md +3 -0
- package/mocks/regression/input/includes/deep.md +1 -0
- package/mocks/regression/input/includes.md +3 -0
- package/mocks/regression/input/redirects.yaml +6 -0
- package/mocks/regression/input/toc.yaml +7 -3
- package/mocks/restricted-access/test1/input/index.md +0 -0
- package/mocks/restricted-access/test1/input/plugins/index.md +0 -0
- package/mocks/restricted-access/test1/input/plugins/index2.md +0 -0
- package/mocks/restricted-access/test1/input/plugins/index3.md +0 -0
- package/mocks/restricted-access/test1/input/plugins/index4.md +4 -0
- package/mocks/restricted-access/test1/input/toc.yaml +28 -0
- package/mocks/restricted-access/test2/input/index.md +0 -0
- package/mocks/restricted-access/test2/input/plugins/index.md +0 -0
- package/mocks/restricted-access/test2/input/project/index.md +0 -0
- package/mocks/restricted-access/test2/input/toc.yaml +21 -0
- package/mocks/restricted-access/test3/input/a1.md +1 -0
- package/mocks/restricted-access/test3/input/folder1/a1.md +1 -0
- package/mocks/restricted-access/test3/input/folder1/folder2/a1.md +1 -0
- package/mocks/restricted-access/test3/input/folder1/folder2/toc.yaml +8 -0
- package/mocks/restricted-access/test3/input/folder1/toc.yaml +10 -0
- package/mocks/restricted-access/test3/input/index.md +0 -0
- package/mocks/restricted-access/test3/input/toc.yaml +16 -0
- package/package.json +1 -1
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`Allow load custom resources > md2html single page with custom resources > .yfm 1`] = `
|
|
4
|
-
"resources:
|
|
5
|
-
style:
|
|
6
|
-
- _assets/style/test.css
|
|
7
|
-
script:
|
|
8
|
-
- _assets/script/test1.js
|
|
9
|
-
"
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
3
|
exports[`Allow load custom resources > md2html single page with custom resources > filelist 1`] = `
|
|
13
4
|
"[
|
|
14
5
|
".yfm",
|
|
15
6
|
"_assets/script/test1.js",
|
|
16
7
|
"_assets/style/test.css",
|
|
8
|
+
"_bundle/search-async-1",
|
|
17
9
|
"_bundle/search-async-0",
|
|
18
10
|
"_bundle/app-css-1",
|
|
19
11
|
"_bundle/app-js-1",
|
|
@@ -38,212 +30,183 @@ exports[`Allow load custom resources > md2html single page with custom resources
|
|
|
38
30
|
]"
|
|
39
31
|
`;
|
|
40
32
|
|
|
41
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
33
|
+
exports[`Allow load custom resources > md2html single page with custom resources 1`] = `
|
|
34
|
+
"resources:
|
|
35
|
+
style:
|
|
36
|
+
- _assets/style/test.css
|
|
37
|
+
script:
|
|
38
|
+
- _assets/script/test1.js
|
|
42
39
|
"
|
|
43
|
-
<!DOCTYPE html>
|
|
44
|
-
<html lang="ru" dir="ltr">
|
|
45
|
-
<head>
|
|
46
|
-
<meta charset="utf-8">
|
|
47
|
-
<base href="./" />
|
|
48
|
-
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
|
|
49
|
-
<meta name="title" content="Documentation" />
|
|
50
|
-
<meta name="noIndex" content="true" />
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
54
|
-
<title>Documentation | Documentation</title>
|
|
55
|
-
<style type="text/css">
|
|
56
|
-
body {
|
|
57
|
-
height: 100vh;
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
60
|
-
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0" />
|
|
61
|
-
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1" />
|
|
62
|
-
<link rel="stylesheet" type="text/css" href="_assets/style/test.css" id="custom-style">
|
|
63
|
-
<script src="_assets/script/test1.js"></script>
|
|
64
|
-
</head>
|
|
65
|
-
<body class="g-root g-root_theme_light">
|
|
66
|
-
<div id="root"></div>
|
|
67
|
-
<script type="application/json" id="diplodoc-state">
|
|
68
|
-
{"data":{"data":{"title":"Documentation","description":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"title":"Documentation","leading":true},"router":{"pathname":"index","depth":1},"lang":"ru","langs":["ru"]}
|
|
69
|
-
</script>
|
|
70
|
-
<script type="application/javascript">
|
|
71
|
-
function unescapeJsonFromHtml(escaped) {
|
|
72
|
-
const unescaped = escaped.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
73
|
-
return JSON.parse(unescaped);
|
|
74
|
-
}
|
|
75
|
-
const data = document.querySelector('script#diplodoc-state');
|
|
76
|
-
window.__DATA__ = unescapeJsonFromHtml(data.innerText);
|
|
77
|
-
window.STATIC_CONTENT = false;
|
|
78
|
-
</script>
|
|
79
|
-
<script src="toc.js" type="application/javascript"></script>
|
|
80
|
-
|
|
81
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
82
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
83
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
84
|
-
</body>
|
|
85
|
-
</html>
|
|
86
|
-
"
|
|
87
40
|
`;
|
|
88
41
|
|
|
89
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<meta name="
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
129
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
130
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
131
|
-
</body>
|
|
132
|
-
</html>
|
|
133
|
-
"
|
|
42
|
+
exports[`Allow load custom resources > md2html single page with custom resources 2`] = `
|
|
43
|
+
"<!DOCTYPE html>
|
|
44
|
+
<html lang="ru" dir="ltr">
|
|
45
|
+
<head>
|
|
46
|
+
<meta charset="utf-8">
|
|
47
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
48
|
+
<base href="./" />
|
|
49
|
+
<title>Documentation | Documentation</title>
|
|
50
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
51
|
+
<meta name="title" content="Documentation">
|
|
52
|
+
<meta name="noIndex" content="true">
|
|
53
|
+
|
|
54
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
55
|
+
|
|
56
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
57
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
58
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
59
|
+
</head>
|
|
60
|
+
<body class="g-root g-root_theme_light">
|
|
61
|
+
<div id="root"></div>
|
|
62
|
+
<script type="application/json" id="diplodoc-state">
|
|
63
|
+
{"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"title":"Documentation"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}
|
|
64
|
+
</script>
|
|
65
|
+
<script type="application/javascript">
|
|
66
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
67
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
68
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
69
|
+
})(data.innerText));
|
|
70
|
+
window.STATIC_CONTENT = false;
|
|
71
|
+
</script>
|
|
72
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
73
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
74
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
75
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
76
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
77
|
+
|
|
78
|
+
</body>
|
|
79
|
+
</html>"
|
|
134
80
|
`;
|
|
135
81
|
|
|
136
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
175
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
176
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
177
|
-
</body>
|
|
178
|
-
</html>
|
|
179
|
-
"
|
|
82
|
+
exports[`Allow load custom resources > md2html single page with custom resources 3`] = `
|
|
83
|
+
"<!DOCTYPE html>
|
|
84
|
+
<html lang="ru" dir="ltr">
|
|
85
|
+
<head>
|
|
86
|
+
<meta charset="utf-8">
|
|
87
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
88
|
+
<base href="./" />
|
|
89
|
+
<title>Documentation</title>
|
|
90
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
91
|
+
<meta name="yfm" content="builder">
|
|
92
|
+
|
|
93
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
94
|
+
|
|
95
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
96
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
97
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
98
|
+
</head>
|
|
99
|
+
<body class="g-root g-root_theme_light">
|
|
100
|
+
<div id="root"></div>
|
|
101
|
+
<script type="application/json" id="diplodoc-state">
|
|
102
|
+
{"data":{"leading":false,"html":"<p>Lorem</p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"headings":[],"title":""},"router":{"pathname":"page","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}
|
|
103
|
+
</script>
|
|
104
|
+
<script type="application/javascript">
|
|
105
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
106
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
107
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
108
|
+
})(data.innerText));
|
|
109
|
+
window.STATIC_CONTENT = false;
|
|
110
|
+
</script>
|
|
111
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
112
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
113
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
114
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
115
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
116
|
+
|
|
117
|
+
</body>
|
|
118
|
+
</html>"
|
|
180
119
|
`;
|
|
181
120
|
|
|
182
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
<
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
220
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
221
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
222
|
-
</body>
|
|
223
|
-
</html>
|
|
224
|
-
"
|
|
121
|
+
exports[`Allow load custom resources > md2html single page with custom resources 4`] = `
|
|
122
|
+
"<!DOCTYPE html>
|
|
123
|
+
<html lang="ru" dir="ltr">
|
|
124
|
+
<head>
|
|
125
|
+
<meta charset="utf-8">
|
|
126
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
127
|
+
<base href="../" />
|
|
128
|
+
<title>Documentation</title>
|
|
129
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
130
|
+
|
|
131
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
132
|
+
|
|
133
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
134
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
135
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
136
|
+
</head>
|
|
137
|
+
<body class="g-root g-root_theme_light">
|
|
138
|
+
<div id="root"></div>
|
|
139
|
+
<script type="application/json" id="diplodoc-state">
|
|
140
|
+
{"data":{"leading":false,"html":"<p>Lorem</p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"headings":[],"title":""},"router":{"pathname":"project/config","depth":2,"base":"../"},"lang":"ru","langs":["ru"]}
|
|
141
|
+
</script>
|
|
142
|
+
<script type="application/javascript">
|
|
143
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
144
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
145
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
146
|
+
})(data.innerText));
|
|
147
|
+
window.STATIC_CONTENT = false;
|
|
148
|
+
</script>
|
|
149
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
150
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
151
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
152
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
153
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
154
|
+
|
|
155
|
+
</body>
|
|
156
|
+
</html>"
|
|
225
157
|
`;
|
|
226
158
|
|
|
227
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
159
|
+
exports[`Allow load custom resources > md2html single page with custom resources 5`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"#index","items":[{"name":"Documentation","href":"#page","id":"UUID"},{"name":"Config","href":"#project_config","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
|
|
228
160
|
|
|
229
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
161
|
+
exports[`Allow load custom resources > md2html single page with custom resources 6`] = `
|
|
162
|
+
"<!DOCTYPE html>
|
|
163
|
+
<html lang="ru" dir="ltr">
|
|
164
|
+
<head>
|
|
165
|
+
<meta charset="utf-8">
|
|
166
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
167
|
+
<base href="./" />
|
|
168
|
+
<title>Documentation | Documentation</title>
|
|
169
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
170
|
+
<meta name="yfm" content="builder">
|
|
171
|
+
|
|
172
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
173
|
+
|
|
174
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
175
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
176
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
177
|
+
</head>
|
|
178
|
+
<body class="g-root g-root_theme_light">
|
|
179
|
+
<div id="root"></div>
|
|
180
|
+
<script type="application/json" id="diplodoc-state">
|
|
181
|
+
{"data":{"leading":false,"html":"<p>Lorem</p>/n<hr class=\\"yfm-page__delimeter\\"><p>Lorem</p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"title":"Documentation"},"router":{"pathname":"single-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}
|
|
182
|
+
</script>
|
|
183
|
+
<script type="application/javascript">
|
|
184
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
185
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
186
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
187
|
+
})(data.innerText));
|
|
188
|
+
window.STATIC_CONTENT = false;
|
|
189
|
+
</script>
|
|
190
|
+
<script type="application/javascript" defer src="single-page-toc.js"></script>
|
|
191
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
192
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
193
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
194
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
195
|
+
|
|
196
|
+
</body>
|
|
197
|
+
</html>"
|
|
198
|
+
`;
|
|
230
199
|
|
|
231
|
-
exports[`Allow load custom resources > md2html single page with custom resources
|
|
200
|
+
exports[`Allow load custom resources > md2html single page with custom resources 7`] = `"{"data":{"leading":false,"html":"<p>Lorem</p>/n<hr class=\\"yfm-page__delimeter\\"><p>Lorem</p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"title":"Documentation","toc":{"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"UUID"},{"name":"Config","href":"project/config.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"single-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}"`;
|
|
232
201
|
|
|
233
|
-
exports[`Allow load custom resources > md2html with custom resources
|
|
234
|
-
"resources:
|
|
235
|
-
style:
|
|
236
|
-
- _assets/style/test.css
|
|
237
|
-
script:
|
|
238
|
-
- _assets/script/test1.js
|
|
239
|
-
"
|
|
240
|
-
`;
|
|
202
|
+
exports[`Allow load custom resources > md2html single page with custom resources 8`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"UUID"},{"name":"Config","href":"project/config.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
|
|
241
203
|
|
|
242
204
|
exports[`Allow load custom resources > md2html with custom resources > filelist 1`] = `
|
|
243
205
|
"[
|
|
244
206
|
".yfm",
|
|
245
207
|
"_assets/script/test1.js",
|
|
246
208
|
"_assets/style/test.css",
|
|
209
|
+
"_bundle/search-async-1",
|
|
247
210
|
"_bundle/search-async-0",
|
|
248
211
|
"_bundle/app-css-1",
|
|
249
212
|
"_bundle/app-js-1",
|
|
@@ -265,158 +228,134 @@ exports[`Allow load custom resources > md2html with custom resources > filelist
|
|
|
265
228
|
]"
|
|
266
229
|
`;
|
|
267
230
|
|
|
268
|
-
exports[`Allow load custom resources > md2html with custom resources
|
|
231
|
+
exports[`Allow load custom resources > md2html with custom resources 1`] = `
|
|
232
|
+
"resources:
|
|
233
|
+
style:
|
|
234
|
+
- _assets/style/test.css
|
|
235
|
+
script:
|
|
236
|
+
- _assets/script/test1.js
|
|
269
237
|
"
|
|
270
|
-
<!DOCTYPE html>
|
|
271
|
-
<html lang="ru" dir="ltr">
|
|
272
|
-
<head>
|
|
273
|
-
<meta charset="utf-8">
|
|
274
|
-
<base href="./" />
|
|
275
|
-
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
|
|
276
|
-
<meta name="title" content="Documentation" />
|
|
277
|
-
<meta name="noIndex" content="true" />
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
281
|
-
<title>Documentation | Documentation</title>
|
|
282
|
-
<style type="text/css">
|
|
283
|
-
body {
|
|
284
|
-
height: 100vh;
|
|
285
|
-
}
|
|
286
|
-
</style>
|
|
287
|
-
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0" />
|
|
288
|
-
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1" />
|
|
289
|
-
<link rel="stylesheet" type="text/css" href="_assets/style/test.css" id="custom-style">
|
|
290
|
-
<script src="_assets/script/test1.js"></script>
|
|
291
|
-
</head>
|
|
292
|
-
<body class="g-root g-root_theme_light">
|
|
293
|
-
<div id="root"></div>
|
|
294
|
-
<script type="application/json" id="diplodoc-state">
|
|
295
|
-
{"data":{"data":{"title":"Documentation","description":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"title":"Documentation","leading":true},"router":{"pathname":"index","depth":1},"lang":"ru","langs":["ru"]}
|
|
296
|
-
</script>
|
|
297
|
-
<script type="application/javascript">
|
|
298
|
-
function unescapeJsonFromHtml(escaped) {
|
|
299
|
-
const unescaped = escaped.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
300
|
-
return JSON.parse(unescaped);
|
|
301
|
-
}
|
|
302
|
-
const data = document.querySelector('script#diplodoc-state');
|
|
303
|
-
window.__DATA__ = unescapeJsonFromHtml(data.innerText);
|
|
304
|
-
window.STATIC_CONTENT = false;
|
|
305
|
-
</script>
|
|
306
|
-
<script src="toc.js" type="application/javascript"></script>
|
|
307
|
-
|
|
308
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
309
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
310
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
311
|
-
</body>
|
|
312
|
-
</html>
|
|
313
|
-
"
|
|
314
238
|
`;
|
|
315
239
|
|
|
316
|
-
exports[`Allow load custom resources > md2html with custom resources
|
|
317
|
-
"
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<meta name="
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
<
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
356
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
357
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
358
|
-
</body>
|
|
359
|
-
</html>
|
|
360
|
-
"
|
|
240
|
+
exports[`Allow load custom resources > md2html with custom resources 2`] = `
|
|
241
|
+
"<!DOCTYPE html>
|
|
242
|
+
<html lang="ru" dir="ltr">
|
|
243
|
+
<head>
|
|
244
|
+
<meta charset="utf-8">
|
|
245
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
246
|
+
<base href="./" />
|
|
247
|
+
<title>Documentation | Documentation</title>
|
|
248
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
249
|
+
<meta name="title" content="Documentation">
|
|
250
|
+
<meta name="noIndex" content="true">
|
|
251
|
+
|
|
252
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
253
|
+
|
|
254
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
255
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
256
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
257
|
+
</head>
|
|
258
|
+
<body class="g-root g-root_theme_light">
|
|
259
|
+
<div id="root"></div>
|
|
260
|
+
<script type="application/json" id="diplodoc-state">
|
|
261
|
+
{"data":{"leading":true,"data":{"title":"Documentation","description":"","links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"],"title":"Documentation","noIndex":true},"title":"Documentation"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}
|
|
262
|
+
</script>
|
|
263
|
+
<script type="application/javascript">
|
|
264
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
265
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
266
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
267
|
+
})(data.innerText));
|
|
268
|
+
window.STATIC_CONTENT = false;
|
|
269
|
+
</script>
|
|
270
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
271
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
272
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
273
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
274
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
275
|
+
|
|
276
|
+
</body>
|
|
277
|
+
</html>"
|
|
361
278
|
`;
|
|
362
279
|
|
|
363
|
-
exports[`Allow load custom resources > md2html with custom resources
|
|
364
|
-
"
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
<
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<script type="application/javascript" src="_bundle/search-js-0"></script>
|
|
402
|
-
<script type="application/javascript" src="_bundle/app-js-1"></script>
|
|
403
|
-
<script type="application/javascript" src="_bundle/search-js-2"></script>
|
|
404
|
-
</body>
|
|
405
|
-
</html>
|
|
406
|
-
"
|
|
280
|
+
exports[`Allow load custom resources > md2html with custom resources 3`] = `
|
|
281
|
+
"<!DOCTYPE html>
|
|
282
|
+
<html lang="ru" dir="ltr">
|
|
283
|
+
<head>
|
|
284
|
+
<meta charset="utf-8">
|
|
285
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
286
|
+
<base href="./" />
|
|
287
|
+
<title>Documentation</title>
|
|
288
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
289
|
+
<meta name="yfm" content="builder">
|
|
290
|
+
|
|
291
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
292
|
+
|
|
293
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
294
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
295
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
296
|
+
</head>
|
|
297
|
+
<body class="g-root g-root_theme_light">
|
|
298
|
+
<div id="root"></div>
|
|
299
|
+
<script type="application/json" id="diplodoc-state">
|
|
300
|
+
{"data":{"leading":false,"html":"<p>Lorem</p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"headings":[],"title":""},"router":{"pathname":"page","depth":1,"base":"./"},"lang":"ru","langs":["ru"]}
|
|
301
|
+
</script>
|
|
302
|
+
<script type="application/javascript">
|
|
303
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
304
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
305
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
306
|
+
})(data.innerText));
|
|
307
|
+
window.STATIC_CONTENT = false;
|
|
308
|
+
</script>
|
|
309
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
310
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
311
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
312
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
313
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
314
|
+
|
|
315
|
+
</body>
|
|
316
|
+
</html>"
|
|
407
317
|
`;
|
|
408
318
|
|
|
409
|
-
exports[`Allow load custom resources > md2html with custom resources
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
"
|
|
319
|
+
exports[`Allow load custom resources > md2html with custom resources 4`] = `
|
|
320
|
+
"<!DOCTYPE html>
|
|
321
|
+
<html lang="ru" dir="ltr">
|
|
322
|
+
<head>
|
|
323
|
+
<meta charset="utf-8">
|
|
324
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
325
|
+
<base href="../" />
|
|
326
|
+
<title>Documentation</title>
|
|
327
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
328
|
+
|
|
329
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
330
|
+
|
|
331
|
+
<link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
|
|
332
|
+
<link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
|
|
333
|
+
<link type="text/css" rel="stylesheet" href="_assets/style/test.css"/>
|
|
334
|
+
</head>
|
|
335
|
+
<body class="g-root g-root_theme_light">
|
|
336
|
+
<div id="root"></div>
|
|
337
|
+
<script type="application/json" id="diplodoc-state">
|
|
338
|
+
{"data":{"leading":false,"html":"<p>Lorem</p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/style/test.css"],"script":["_assets/script/test1.js"]},"headings":[],"title":""},"router":{"pathname":"project/config","depth":2,"base":"../"},"lang":"ru","langs":["ru"]}
|
|
339
|
+
</script>
|
|
340
|
+
<script type="application/javascript">
|
|
341
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
342
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
343
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
344
|
+
})(data.innerText));
|
|
345
|
+
window.STATIC_CONTENT = false;
|
|
346
|
+
</script>
|
|
347
|
+
<script type="application/javascript" defer src="toc.js"></script>
|
|
348
|
+
<script type="application/javascript" defer src="_bundle/search-js-0"></script>
|
|
349
|
+
<script type="application/javascript" defer src="_bundle/app-js-1"></script>
|
|
350
|
+
<script type="application/javascript" defer src="_bundle/search-js-2"></script>
|
|
351
|
+
<script type="application/javascript" defer src="_assets/script/test1.js"></script>
|
|
352
|
+
|
|
353
|
+
</body>
|
|
354
|
+
</html>"
|
|
418
355
|
`;
|
|
419
356
|
|
|
357
|
+
exports[`Allow load custom resources > md2html with custom resources 5`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"UUID"},{"name":"Config","href":"project/config.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
|
|
358
|
+
|
|
420
359
|
exports[`Allow load custom resources > md2md with custom resources > filelist 1`] = `
|
|
421
360
|
"[
|
|
422
361
|
".yfm",
|
|
@@ -429,7 +368,16 @@ exports[`Allow load custom resources > md2md with custom resources > filelist 1`
|
|
|
429
368
|
]"
|
|
430
369
|
`;
|
|
431
370
|
|
|
432
|
-
exports[`Allow load custom resources > md2md with custom resources
|
|
371
|
+
exports[`Allow load custom resources > md2md with custom resources 1`] = `
|
|
372
|
+
"resources:
|
|
373
|
+
style:
|
|
374
|
+
- _assets/style/test.css
|
|
375
|
+
script:
|
|
376
|
+
- _assets/script/test1.js
|
|
377
|
+
"
|
|
378
|
+
`;
|
|
379
|
+
|
|
380
|
+
exports[`Allow load custom resources > md2md with custom resources 2`] = `
|
|
433
381
|
"title: Documentation
|
|
434
382
|
description: ''
|
|
435
383
|
meta:
|
|
@@ -449,7 +397,7 @@ links:
|
|
|
449
397
|
"
|
|
450
398
|
`;
|
|
451
399
|
|
|
452
|
-
exports[`Allow load custom resources > md2md with custom resources
|
|
400
|
+
exports[`Allow load custom resources > md2md with custom resources 3`] = `
|
|
453
401
|
"---
|
|
454
402
|
metadata:
|
|
455
403
|
- name: generator
|
|
@@ -466,7 +414,7 @@ Lorem
|
|
|
466
414
|
"
|
|
467
415
|
`;
|
|
468
416
|
|
|
469
|
-
exports[`Allow load custom resources > md2md with custom resources
|
|
417
|
+
exports[`Allow load custom resources > md2md with custom resources 4`] = `
|
|
470
418
|
"---
|
|
471
419
|
metadata:
|
|
472
420
|
- name: generator
|
|
@@ -479,7 +427,7 @@ script:
|
|
|
479
427
|
Lorem"
|
|
480
428
|
`;
|
|
481
429
|
|
|
482
|
-
exports[`Allow load custom resources > md2md with custom resources
|
|
430
|
+
exports[`Allow load custom resources > md2md with custom resources 5`] = `
|
|
483
431
|
"title: Documentation
|
|
484
432
|
href: index.yaml
|
|
485
433
|
items:
|
|
@@ -487,5 +435,6 @@ items:
|
|
|
487
435
|
href: page.md
|
|
488
436
|
- name: Config
|
|
489
437
|
href: project/config.md
|
|
438
|
+
path: toc.yaml
|
|
490
439
|
"
|
|
491
440
|
`;
|