@diplodoc/cli-tests 4.60.0 → 5.0.1

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.
Files changed (50) hide show
  1. package/e2e/__snapshots__/include-toc.test.ts.snap +106 -106
  2. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +303 -350
  3. package/e2e/__snapshots__/metadata.spec.ts.snap +124 -147
  4. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  5. package/e2e/__snapshots__/regression.test.ts.snap +906 -715
  6. package/e2e/__snapshots__/restricted-access.test.ts.snap +234 -0
  7. package/e2e/__snapshots__/rtl.spec.ts.snap +258 -308
  8. package/e2e/__snapshots__/translation.spec.ts.snap +366 -0
  9. package/e2e/errors.spec.ts +31 -0
  10. package/e2e/regression.test.ts +7 -2
  11. package/e2e/restricted-access.test.ts +21 -0
  12. package/e2e/translation.spec.ts +1 -1
  13. package/fixtures/cliAdapter.ts +41 -20
  14. package/fixtures/runners/binary.ts +18 -3
  15. package/fixtures/runners/source.ts +5 -5
  16. package/fixtures/runners/types.ts +7 -1
  17. package/fixtures/utils/file.ts +3 -3
  18. package/fixtures/utils/test.ts +6 -1
  19. package/mocks/errors/unreachable-link/input/exists.md +1 -0
  20. package/mocks/errors/unreachable-link/input/index.md +2 -0
  21. package/mocks/errors/unreachable-link/input/toc.yaml +1 -0
  22. package/mocks/include-toc/test6/input/toc.yaml +1 -0
  23. package/mocks/regression/input/1.md +2 -0
  24. package/mocks/regression/input/generic/1.md +3 -0
  25. package/mocks/regression/input/generic/2.md +3 -0
  26. package/mocks/regression/input/generic/3.md +1 -0
  27. package/mocks/regression/input/generic/Sub notes/1.md +3 -0
  28. package/mocks/regression/input/generic/Sub notes/2.md +3 -0
  29. package/mocks/regression/input/includes/deep.md +1 -0
  30. package/mocks/regression/input/includes.md +3 -0
  31. package/mocks/regression/input/redirects.yaml +6 -0
  32. package/mocks/regression/input/toc.yaml +7 -3
  33. package/mocks/restricted-access/test1/input/index.md +0 -0
  34. package/mocks/restricted-access/test1/input/plugins/index.md +0 -0
  35. package/mocks/restricted-access/test1/input/plugins/index2.md +0 -0
  36. package/mocks/restricted-access/test1/input/plugins/index3.md +0 -0
  37. package/mocks/restricted-access/test1/input/plugins/index4.md +4 -0
  38. package/mocks/restricted-access/test1/input/toc.yaml +28 -0
  39. package/mocks/restricted-access/test2/input/index.md +0 -0
  40. package/mocks/restricted-access/test2/input/plugins/index.md +0 -0
  41. package/mocks/restricted-access/test2/input/project/index.md +0 -0
  42. package/mocks/restricted-access/test2/input/toc.yaml +21 -0
  43. package/mocks/restricted-access/test3/input/a1.md +1 -0
  44. package/mocks/restricted-access/test3/input/folder1/a1.md +1 -0
  45. package/mocks/restricted-access/test3/input/folder1/folder2/a1.md +1 -0
  46. package/mocks/restricted-access/test3/input/folder1/folder2/toc.yaml +8 -0
  47. package/mocks/restricted-access/test3/input/folder1/toc.yaml +10 -0
  48. package/mocks/restricted-access/test3/input/index.md +0 -0
  49. package/mocks/restricted-access/test3/input/toc.yaml +16 -0
  50. package/package.json +1 -1
@@ -1,328 +1,127 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang > .yfm 1`] = `"langs: ['he']"`;
4
-
5
3
  exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang > filelist 1`] = `
6
4
  "[
7
5
  ".yfm",
6
+ "_bundle/search-async-1",
8
7
  "_bundle/search-async-0",
9
8
  "_bundle/app-css-1",
10
9
  "_bundle/app-js-1",
11
- "_bundle/search-css-2",
10
+ "_bundle/app-css-3",
12
11
  "_bundle/latex-extension.css",
13
12
  "_bundle/latex-extension.js",
14
13
  "_bundle/mermaid-extension.js",
15
14
  "_bundle/page-constructor-extension.css",
16
15
  "_bundle/page-constructor-extension.js",
17
16
  "_bundle/search-js-0",
18
- "_bundle/search-js-1",
19
17
  "_bundle/search-css-0",
20
- "_bundle/search-js-2",
18
+ "_bundle/search-js-1",
19
+ "_bundle/search-css-3",
21
20
  "_bundle/search-css-1",
21
+ "_bundle/search-js-2",
22
+ "_bundle/search-css-2",
22
23
  "index.html",
23
24
  "page.html",
24
25
  "toc.js"
25
26
  ]"
26
27
  `;
27
28
 
28
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang > index.html 1`] = `
29
- "
30
- <!DOCTYPE html>
31
- <html lang="he" dir="rtl">
32
- <head>
33
- <meta charset="utf-8">
34
- <base href="./" />
35
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
36
-
37
-
38
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
39
- <title>Documentation</title>
40
- <style type="text/css">
41
- body {
42
- height: 100vh;
43
- }
44
- </style>
45
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-1" />
46
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-2" />
47
-
48
- </head>
49
- <body class="g-root g-root_theme_light">
50
- <div id="root"></div>
51
- <script type="application/json" id="diplodoc-state">
52
- {"data":{"data":{"title":"Documentation","links":[{"title":"Documentation","href":"page.html"}],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]}},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"","leading":true},"router":{"pathname":"index","depth":1},"lang":"he","langs":["he"]}
53
- </script>
54
- <script type="application/javascript">
55
- function unescapeJsonFromHtml(escaped) {
56
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
57
- return JSON.parse(unescaped);
58
- }
59
- const data = document.querySelector('script#diplodoc-state');
60
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
61
- window.STATIC_CONTENT = false;
62
- </script>
63
- <script src="toc.js" type="application/javascript"></script>
64
-
65
- <script type="application/javascript" src="_bundle/search-js-0"></script>
66
- <script type="application/javascript" src="_bundle/app-js-1"></script>
67
- <script type="application/javascript" src="_bundle/search-js-2"></script>
68
- </body>
69
- </html>
70
- "
71
- `;
72
-
73
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang > page.html 1`] = `
74
- "
75
- <!DOCTYPE html>
76
- <html lang="he" dir="rtl">
77
- <head>
78
- <meta charset="utf-8">
79
- <base href="./" />
80
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
81
-
82
-
83
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
84
- <title>Documentation</title>
85
- <style type="text/css">
86
- body {
87
- height: 100vh;
88
- }
89
- </style>
90
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-1" />
91
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-2" />
92
-
93
- </head>
94
- <body class="g-root g-root_theme_light">
95
- <div id="root"></div>
96
- <script type="application/json" id="diplodoc-state">
97
- {"data":{"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"headings":[],"title":"","html":"&lt;p&gt;תיעוד&lt;/p&gt;/n","leading":false},"router":{"pathname":"page","depth":1},"lang":"he","langs":["he"]}
98
- </script>
99
- <script type="application/javascript">
100
- function unescapeJsonFromHtml(escaped) {
101
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
102
- return JSON.parse(unescaped);
103
- }
104
- const data = document.querySelector('script#diplodoc-state');
105
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
106
- window.STATIC_CONTENT = false;
107
- </script>
108
- <script src="toc.js" type="application/javascript"></script>
109
-
110
- <script type="application/javascript" src="_bundle/search-js-0"></script>
111
- <script type="application/javascript" src="_bundle/app-js-1"></script>
112
- <script type="application/javascript" src="_bundle/search-js-2"></script>
113
- </body>
114
- </html>
115
- "
116
- `;
117
-
118
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang > toc.js 1`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"UUID"}],"id":"UUID"};"`;
119
-
120
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > .yfm 1`] = `"langs: ['ar', 'en']"`;
121
-
122
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > ar/index.html 1`] = `
123
- "
124
- <!DOCTYPE html>
125
- <html lang="ar" dir="rtl">
126
- <head>
127
- <meta charset="utf-8">
128
- <base href="../" />
129
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
130
-
131
-
132
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
133
- <title>Documentation</title>
134
- <style type="text/css">
135
- body {
136
- height: 100vh;
137
- }
138
- </style>
139
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-1" />
140
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-2" />
141
-
142
- </head>
143
- <body class="g-root g-root_theme_light">
144
- <div id="root"></div>
145
- <script type="application/json" id="diplodoc-state">
146
- {"data":{"data":{"title":"Documentation","links":[{"title":"Documentation","href":"ar/page.html"}],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]}},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"","leading":true},"router":{"pathname":"ar/index","depth":2},"lang":"ar","langs":["ar","en"]}
147
- </script>
148
- <script type="application/javascript">
149
- function unescapeJsonFromHtml(escaped) {
150
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
151
- return JSON.parse(unescaped);
152
- }
153
- const data = document.querySelector('script#diplodoc-state');
154
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
155
- window.STATIC_CONTENT = false;
156
- </script>
157
- <script src="ar/toc.js" type="application/javascript"></script>
158
-
159
- <script type="application/javascript" src="_bundle/search-js-0"></script>
160
- <script type="application/javascript" src="_bundle/app-js-1"></script>
161
- <script type="application/javascript" src="_bundle/search-js-2"></script>
162
- </body>
163
- </html>
164
- "
165
- `;
166
-
167
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > ar/page.html 1`] = `
168
- "
169
- <!DOCTYPE html>
170
- <html lang="ar" dir="rtl">
171
- <head>
172
- <meta charset="utf-8">
173
- <base href="../" />
174
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
175
-
176
-
177
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
178
- <title>Documentation</title>
179
- <style type="text/css">
180
- body {
181
- height: 100vh;
182
- }
183
- </style>
184
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-1" />
185
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-2" />
186
-
187
- </head>
188
- <body class="g-root g-root_theme_light">
189
- <div id="root"></div>
190
- <script type="application/json" id="diplodoc-state">
191
- {"data":{"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"headings":[],"title":"","html":"&lt;p&gt;توثيق&lt;/p&gt;/n","leading":false},"router":{"pathname":"ar/page","depth":2},"lang":"ar","langs":["ar","en"]}
192
- </script>
193
- <script type="application/javascript">
194
- function unescapeJsonFromHtml(escaped) {
195
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
196
- return JSON.parse(unescaped);
197
- }
198
- const data = document.querySelector('script#diplodoc-state');
199
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
200
- window.STATIC_CONTENT = false;
201
- </script>
202
- <script src="ar/toc.js" type="application/javascript"></script>
203
-
204
- <script type="application/javascript" src="_bundle/search-js-0"></script>
205
- <script type="application/javascript" src="_bundle/app-js-1"></script>
206
- <script type="application/javascript" src="_bundle/search-js-2"></script>
207
- </body>
208
- </html>
209
- "
210
- `;
211
-
212
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > ar/toc.js 1`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"ar/index.html","items":[{"name":"Documentation","href":"ar/page.html","id":"UUID"}],"id":"UUID"};"`;
213
-
214
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > en/index.html 1`] = `
215
- "
216
- <!DOCTYPE html>
217
- <html lang="en" dir="ltr">
218
- <head>
219
- <meta charset="utf-8">
220
- <base href="../" />
221
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
222
- <meta name="title" content="Documentation" />
223
- <meta name="noIndex" content="true" />
29
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 1`] = `"langs: ['he']"`;
224
30
 
225
-
226
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
227
- <title>Documentation | Documentation</title>
228
- <style type="text/css">
229
- body {
230
- height: 100vh;
231
- }
232
- </style>
233
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-0" />
234
- <link type="text/css" rel="stylesheet" href="_bundle/app-css-1" />
235
-
236
- </head>
237
- <body class="g-root g-root_theme_light">
238
- <div id="root"></div>
239
- <script type="application/json" id="diplodoc-state">
240
- {"data":{"data":{"title":"Documentation","description":"","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"title":"Documentation","noIndex":true},"links":[{"title":"Getting started with Documentation","description":"This guide will show you the basics of working with Documentation","href":"en/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"title":"Documentation","noIndex":true},"title":"Documentation","leading":true},"router":{"pathname":"en/index","depth":2},"lang":"en","langs":["ar","en"]}
241
- </script>
242
- <script type="application/javascript">
243
- function unescapeJsonFromHtml(escaped) {
244
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
245
- return JSON.parse(unescaped);
246
- }
247
- const data = document.querySelector('script#diplodoc-state');
248
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
249
- window.STATIC_CONTENT = false;
250
- </script>
251
- <script src="en/toc.js" type="application/javascript"></script>
252
-
253
- <script type="application/javascript" src="_bundle/search-js-0"></script>
254
- <script type="application/javascript" src="_bundle/app-js-1"></script>
255
- <script type="application/javascript" src="_bundle/search-js-2"></script>
256
- </body>
257
- </html>
258
- "
31
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 2`] = `
32
+ "<!DOCTYPE html>
33
+ <html lang="he" dir="rtl">
34
+ <head>
35
+ <meta charset="utf-8">
36
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
37
+ <base href="./" />
38
+ <title>Documentation | Documentation</title>
39
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
40
+
41
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
42
+
43
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
44
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-3"/>
45
+ </head>
46
+ <body class="g-root g-root_theme_light">
47
+ <div id="root"></div>
48
+ <script type="application/json" id="diplodoc-state">
49
+ {"data":{"leading":true,"data":{"title":"Documentation","links":[{"title":"Documentation","href":"page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Documentation"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"he","langs":["he"]}
50
+ </script>
51
+ <script type="application/javascript">
52
+ const data = document.querySelector('script#diplodoc-state');
53
+ window.__DATA__ = JSON.parse((function unescape(string) {
54
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
55
+ })(data.innerText));
56
+ window.STATIC_CONTENT = false;
57
+ </script>
58
+ <script type="application/javascript" defer src="toc.js"></script>
59
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
60
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
61
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
62
+
63
+ </body>
64
+ </html>"
259
65
  `;
260
66
 
261
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > en/page.html 1`] = `
262
- "
263
- <!DOCTYPE html>
264
- <html lang="en" dir="ltr">
265
- <head>
266
- <meta charset="utf-8">
267
- <base href="../" />
268
- <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION" />
269
- <meta name="yfm" content="builder" />
270
-
271
-
272
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
273
- <title>Documentation</title>
274
- <style type="text/css">
275
- body {
276
- height: 100vh;
277
- }
278
- </style>
279
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-0" />
280
- <link type="text/css" rel="stylesheet" href="_bundle/app-css-1" />
281
-
282
- </head>
283
- <body class="g-root g-root_theme_light">
284
- <div id="root"></div>
285
- <script type="application/json" id="diplodoc-state">
286
- {"data":{"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}]},"headings":[],"title":"","html":"&lt;p&gt;Lorem&lt;/p&gt;/n","leading":false},"router":{"pathname":"en/page","depth":2},"lang":"en","langs":["ar","en"]}
287
- </script>
288
- <script type="application/javascript">
289
- function unescapeJsonFromHtml(escaped) {
290
- const unescaped = escaped.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
291
- return JSON.parse(unescaped);
292
- }
293
- const data = document.querySelector('script#diplodoc-state');
294
- window.__DATA__ = unescapeJsonFromHtml(data.innerText);
295
- window.STATIC_CONTENT = false;
296
- </script>
297
- <script src="en/toc.js" type="application/javascript"></script>
298
-
299
- <script type="application/javascript" src="_bundle/search-js-0"></script>
300
- <script type="application/javascript" src="_bundle/app-js-1"></script>
301
- <script type="application/javascript" src="_bundle/search-js-2"></script>
302
- </body>
303
- </html>
304
- "
67
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 3`] = `
68
+ "<!DOCTYPE html>
69
+ <html lang="he" dir="rtl">
70
+ <head>
71
+ <meta charset="utf-8">
72
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
73
+ <base href="./" />
74
+ <title>Documentation</title>
75
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
76
+
77
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
78
+
79
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
80
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-3"/>
81
+ </head>
82
+ <body class="g-root g-root_theme_light">
83
+ <div id="root"></div>
84
+ <script type="application/json" id="diplodoc-state">
85
+ {"data":{"leading":false,"html":"&lt;p&gt;תיעוד&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"headings":[],"title":""},"router":{"pathname":"page","depth":1,"base":"./"},"lang":"he","langs":["he"]}
86
+ </script>
87
+ <script type="application/javascript">
88
+ const data = document.querySelector('script#diplodoc-state');
89
+ window.__DATA__ = JSON.parse((function unescape(string) {
90
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
91
+ })(data.innerText));
92
+ window.STATIC_CONTENT = false;
93
+ </script>
94
+ <script type="application/javascript" defer src="toc.js"></script>
95
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
96
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
97
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
98
+
99
+ </body>
100
+ </html>"
305
101
  `;
306
102
 
307
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > en/toc.js 1`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"en/index.html","items":[{"name":"Documentation","href":"en/page.html","id":"UUID"}],"id":"UUID"};"`;
103
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 4`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"index.html","items":[{"name":"Documentation","href":"page.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
308
104
 
309
105
  exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > filelist 1`] = `
310
106
  "[
311
107
  ".yfm",
108
+ "_bundle/search-async-1",
312
109
  "_bundle/search-async-0",
313
110
  "_bundle/app-css-1",
314
111
  "_bundle/app-js-1",
315
- "_bundle/search-css-2",
112
+ "_bundle/app-css-3",
316
113
  "_bundle/latex-extension.css",
317
114
  "_bundle/latex-extension.js",
318
115
  "_bundle/mermaid-extension.js",
319
116
  "_bundle/page-constructor-extension.css",
320
117
  "_bundle/page-constructor-extension.js",
321
118
  "_bundle/search-js-0",
322
- "_bundle/search-js-1",
323
119
  "_bundle/search-css-0",
324
- "_bundle/search-js-2",
120
+ "_bundle/search-js-1",
121
+ "_bundle/search-css-3",
325
122
  "_bundle/search-css-1",
123
+ "_bundle/search-js-2",
124
+ "_bundle/search-css-2",
326
125
  "ar/index.html",
327
126
  "ar/page.html",
328
127
  "ar/toc.js",
@@ -333,29 +132,180 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
333
132
  ]"
334
133
  `;
335
134
 
336
- exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > index.html 1`] = `
337
- "
338
- <!DOCTYPE html>
339
- <html lang="ar" dir="rtl">
340
- <head>
341
- <meta charset="utf-8">
342
- <meta http-equiv="refresh" content="0; url=./ar/index.html">
343
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
344
- <title>Redirect</title>
345
- <style type="text/css">
346
- body {
347
- height: 100vh;
348
- }
349
- </style>
350
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-1" />
351
- <link type="text/css" rel="stylesheet" href="_bundle/search-css-2" />
352
- <script type="text/javascript">
353
- window.location.replace("./ar/index.html");
354
- </script>
355
- </head>
356
- <body class="g-root g-root_theme_light">
357
- If you are not redirected automatically, follow this <a href="./ar/index.html">link to example</a>.
358
- </body>
359
- </html>
360
- "
135
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 1`] = `"langs: ['ar', 'en']"`;
136
+
137
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 2`] = `
138
+ "<!DOCTYPE html>
139
+ <html lang="ar" dir="rtl">
140
+ <head>
141
+ <meta charset="utf-8">
142
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
143
+ <base href="../" />
144
+ <title>Documentation | Documentation</title>
145
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
146
+
147
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
148
+
149
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
150
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-3"/>
151
+ </head>
152
+ <body class="g-root g-root_theme_light">
153
+ <div id="root"></div>
154
+ <script type="application/json" id="diplodoc-state">
155
+ {"data":{"leading":true,"data":{"title":"Documentation","links":[{"title":"Documentation","href":"ar/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Documentation"},"router":{"pathname":"ar/index","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"]}
156
+ </script>
157
+ <script type="application/javascript">
158
+ const data = document.querySelector('script#diplodoc-state');
159
+ window.__DATA__ = JSON.parse((function unescape(string) {
160
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
161
+ })(data.innerText));
162
+ window.STATIC_CONTENT = false;
163
+ </script>
164
+ <script type="application/javascript" defer src="ar/toc.js"></script>
165
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
166
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
167
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
168
+
169
+ </body>
170
+ </html>"
171
+ `;
172
+
173
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 3`] = `
174
+ "<!DOCTYPE html>
175
+ <html lang="ar" dir="rtl">
176
+ <head>
177
+ <meta charset="utf-8">
178
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
179
+ <base href="../" />
180
+ <title>Documentation</title>
181
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
182
+
183
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
184
+
185
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
186
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-3"/>
187
+ </head>
188
+ <body class="g-root g-root_theme_light">
189
+ <div id="root"></div>
190
+ <script type="application/json" id="diplodoc-state">
191
+ {"data":{"leading":false,"html":"&lt;p&gt;توثيق&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"headings":[],"title":""},"router":{"pathname":"ar/page","depth":2,"base":"../"},"lang":"ar","langs":["ar","en"]}
192
+ </script>
193
+ <script type="application/javascript">
194
+ const data = document.querySelector('script#diplodoc-state');
195
+ window.__DATA__ = JSON.parse((function unescape(string) {
196
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
197
+ })(data.innerText));
198
+ window.STATIC_CONTENT = false;
199
+ </script>
200
+ <script type="application/javascript" defer src="ar/toc.js"></script>
201
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
202
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
203
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
204
+
205
+ </body>
206
+ </html>"
207
+ `;
208
+
209
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 4`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"ar/index.html","items":[{"name":"Documentation","href":"ar/page.html","id":"UUID"}],"path":"ar/toc.yaml","id":"UUID"};"`;
210
+
211
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 5`] = `
212
+ "<!DOCTYPE html>
213
+ <html lang="en" dir="ltr">
214
+ <head>
215
+ <meta charset="utf-8">
216
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
217
+ <base href="../" />
218
+ <title>Documentation | Documentation</title>
219
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
220
+ <meta name="title" content="Documentation">
221
+ <meta name="noIndex" content="true">
222
+
223
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
224
+
225
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
226
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
227
+ </head>
228
+ <body class="g-root g-root_theme_light">
229
+ <div id="root"></div>
230
+ <script type="application/json" id="diplodoc-state">
231
+ {"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":"en/page.html"}]},"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"title":"Documentation","noIndex":true},"title":"Documentation"},"router":{"pathname":"en/index","depth":2,"base":"../"},"lang":"en","langs":["ar","en"]}
232
+ </script>
233
+ <script type="application/javascript">
234
+ const data = document.querySelector('script#diplodoc-state');
235
+ window.__DATA__ = JSON.parse((function unescape(string) {
236
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
237
+ })(data.innerText));
238
+ window.STATIC_CONTENT = false;
239
+ </script>
240
+ <script type="application/javascript" defer src="en/toc.js"></script>
241
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
242
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
243
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
244
+
245
+ </body>
246
+ </html>"
247
+ `;
248
+
249
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 6`] = `
250
+ "<!DOCTYPE html>
251
+ <html lang="en" dir="ltr">
252
+ <head>
253
+ <meta charset="utf-8">
254
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
255
+ <base href="../" />
256
+ <title>Documentation</title>
257
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
258
+ <meta name="yfm" content="builder">
259
+
260
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
261
+
262
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
263
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
264
+ </head>
265
+ <body class="g-root g-root_theme_light">
266
+ <div id="root"></div>
267
+ <script type="application/json" id="diplodoc-state">
268
+ {"data":{"leading":false,"html":"&lt;p&gt;Lorem&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"},{"name":"yfm","content":"builder"}]},"headings":[],"title":""},"router":{"pathname":"en/page","depth":2,"base":"../"},"lang":"en","langs":["ar","en"]}
269
+ </script>
270
+ <script type="application/javascript">
271
+ const data = document.querySelector('script#diplodoc-state');
272
+ window.__DATA__ = JSON.parse((function unescape(string) {
273
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
274
+ })(data.innerText));
275
+ window.STATIC_CONTENT = false;
276
+ </script>
277
+ <script type="application/javascript" defer src="en/toc.js"></script>
278
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
279
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
280
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
281
+
282
+ </body>
283
+ </html>"
284
+ `;
285
+
286
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 7`] = `"window.__DATA__.data.toc = {"title":"Documentation","href":"en/index.html","items":[{"name":"Documentation","href":"en/page.html","id":"UUID"}],"path":"en/toc.yaml","id":"UUID"};"`;
287
+
288
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 8`] = `
289
+ "<!DOCTYPE html>
290
+ <html lang="ar" dir="rtl">
291
+ <head>
292
+ <meta charset="utf-8">
293
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
294
+ <base href="./" />
295
+ <title>Redirect to ./ar/index.html</title>
296
+ <meta http-equiv="refresh" content="0; url=./ar/index.html">
297
+
298
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
299
+ <script type="application/javascript">
300
+ window.location.replace("./ar/index.html");
301
+ </script>
302
+
303
+ </head>
304
+ <body class="g-root g-root_theme_light">
305
+ If you are not redirected automatically, follow this <a href="./ar/index.html">link</a>.
306
+
307
+
308
+
309
+ </body>
310
+ </html>"
361
311
  `;