@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.
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 +293 -344
  3. package/e2e/__snapshots__/metadata.spec.ts.snap +119 -144
  4. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  5. package/e2e/__snapshots__/regression.test.ts.snap +904 -715
  6. package/e2e/__snapshots__/restricted-access.test.ts.snap +234 -0
  7. package/e2e/__snapshots__/rtl.spec.ts.snap +248 -302
  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,10 +1,9 @@
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",
@@ -25,290 +24,86 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
25
24
  ]"
26
25
  `;
27
26
 
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" />
27
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 1`] = `"langs: ['he']"`;
224
28
 
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
- "
29
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 2`] = `
30
+ "<!DOCTYPE html>
31
+ <html lang="he" dir="rtl">
32
+ <head>
33
+ <meta charset="utf-8">
34
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
35
+ <base href="./" />
36
+ <title>Documentation | Documentation</title>
37
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
38
+
39
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
40
+
41
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
42
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
43
+ </head>
44
+ <body class="g-root g-root_theme_light">
45
+ <div id="root"></div>
46
+ <script type="application/json" id="diplodoc-state">
47
+ {"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"]}
48
+ </script>
49
+ <script type="application/javascript">
50
+ const data = document.querySelector('script#diplodoc-state');
51
+ window.__DATA__ = JSON.parse((function unescape(string) {
52
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
53
+ })(data.innerText));
54
+ window.STATIC_CONTENT = false;
55
+ </script>
56
+ <script type="application/javascript" defer src="toc.js"></script>
57
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
58
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
59
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
60
+
61
+ </body>
62
+ </html>"
259
63
  `;
260
64
 
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
- "
65
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with only one rtl lang 3`] = `
66
+ "<!DOCTYPE html>
67
+ <html lang="he" dir="rtl">
68
+ <head>
69
+ <meta charset="utf-8">
70
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
71
+ <base href="./" />
72
+ <title>Documentation</title>
73
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
74
+
75
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
76
+
77
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
78
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
79
+ </head>
80
+ <body class="g-root g-root_theme_light">
81
+ <div id="root"></div>
82
+ <script type="application/json" id="diplodoc-state">
83
+ {"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"]}
84
+ </script>
85
+ <script type="application/javascript">
86
+ const data = document.querySelector('script#diplodoc-state');
87
+ window.__DATA__ = JSON.parse((function unescape(string) {
88
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
89
+ })(data.innerText));
90
+ window.STATIC_CONTENT = false;
91
+ </script>
92
+ <script type="application/javascript" defer src="toc.js"></script>
93
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
94
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
95
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
96
+
97
+ </body>
98
+ </html>"
305
99
  `;
306
100
 
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"};"`;
101
+ 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
102
 
309
103
  exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs > filelist 1`] = `
310
104
  "[
311
105
  ".yfm",
106
+ "_bundle/search-async-1",
312
107
  "_bundle/search-async-0",
313
108
  "_bundle/app-css-1",
314
109
  "_bundle/app-js-1",
@@ -333,29 +128,180 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
333
128
  ]"
334
129
  `;
335
130
 
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
- "
131
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 1`] = `"langs: ['ar', 'en']"`;
132
+
133
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 2`] = `
134
+ "<!DOCTYPE html>
135
+ <html lang="ar" dir="rtl">
136
+ <head>
137
+ <meta charset="utf-8">
138
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
139
+ <base href="../" />
140
+ <title>Documentation | Documentation</title>
141
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
142
+
143
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
144
+
145
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
146
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
147
+ </head>
148
+ <body class="g-root g-root_theme_light">
149
+ <div id="root"></div>
150
+ <script type="application/json" id="diplodoc-state">
151
+ {"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"]}
152
+ </script>
153
+ <script type="application/javascript">
154
+ const data = document.querySelector('script#diplodoc-state');
155
+ window.__DATA__ = JSON.parse((function unescape(string) {
156
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
157
+ })(data.innerText));
158
+ window.STATIC_CONTENT = false;
159
+ </script>
160
+ <script type="application/javascript" defer src="ar/toc.js"></script>
161
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
162
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
163
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
164
+
165
+ </body>
166
+ </html>"
167
+ `;
168
+
169
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 3`] = `
170
+ "<!DOCTYPE html>
171
+ <html lang="ar" dir="rtl">
172
+ <head>
173
+ <meta charset="utf-8">
174
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
175
+ <base href="../" />
176
+ <title>Documentation</title>
177
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
178
+
179
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
180
+
181
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-1"/>
182
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-2"/>
183
+ </head>
184
+ <body class="g-root g-root_theme_light">
185
+ <div id="root"></div>
186
+ <script type="application/json" id="diplodoc-state">
187
+ {"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"]}
188
+ </script>
189
+ <script type="application/javascript">
190
+ const data = document.querySelector('script#diplodoc-state');
191
+ window.__DATA__ = JSON.parse((function unescape(string) {
192
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
193
+ })(data.innerText));
194
+ window.STATIC_CONTENT = false;
195
+ </script>
196
+ <script type="application/javascript" defer src="ar/toc.js"></script>
197
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
198
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
199
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
200
+
201
+ </body>
202
+ </html>"
203
+ `;
204
+
205
+ 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"};"`;
206
+
207
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 5`] = `
208
+ "<!DOCTYPE html>
209
+ <html lang="en" dir="ltr">
210
+ <head>
211
+ <meta charset="utf-8">
212
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
213
+ <base href="../" />
214
+ <title>Documentation | Documentation</title>
215
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
216
+ <meta name="title" content="Documentation">
217
+ <meta name="noIndex" content="true">
218
+
219
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
220
+
221
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
222
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
223
+ </head>
224
+ <body class="g-root g-root_theme_light">
225
+ <div id="root"></div>
226
+ <script type="application/json" id="diplodoc-state">
227
+ {"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"]}
228
+ </script>
229
+ <script type="application/javascript">
230
+ const data = document.querySelector('script#diplodoc-state');
231
+ window.__DATA__ = JSON.parse((function unescape(string) {
232
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
233
+ })(data.innerText));
234
+ window.STATIC_CONTENT = false;
235
+ </script>
236
+ <script type="application/javascript" defer src="en/toc.js"></script>
237
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
238
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
239
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
240
+
241
+ </body>
242
+ </html>"
243
+ `;
244
+
245
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 6`] = `
246
+ "<!DOCTYPE html>
247
+ <html lang="en" dir="ltr">
248
+ <head>
249
+ <meta charset="utf-8">
250
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
251
+ <base href="../" />
252
+ <title>Documentation</title>
253
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
254
+ <meta name="yfm" content="builder">
255
+
256
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
257
+
258
+ <link type="text/css" rel="stylesheet" href="_bundle/search-css-0"/>
259
+ <link type="text/css" rel="stylesheet" href="_bundle/app-css-1"/>
260
+ </head>
261
+ <body class="g-root g-root_theme_light">
262
+ <div id="root"></div>
263
+ <script type="application/json" id="diplodoc-state">
264
+ {"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"]}
265
+ </script>
266
+ <script type="application/javascript">
267
+ const data = document.querySelector('script#diplodoc-state');
268
+ window.__DATA__ = JSON.parse((function unescape(string) {
269
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
270
+ })(data.innerText));
271
+ window.STATIC_CONTENT = false;
272
+ </script>
273
+ <script type="application/javascript" defer src="en/toc.js"></script>
274
+ <script type="application/javascript" defer src="_bundle/search-js-0"></script>
275
+ <script type="application/javascript" defer src="_bundle/app-js-1"></script>
276
+ <script type="application/javascript" defer src="_bundle/search-js-2"></script>
277
+
278
+ </body>
279
+ </html>"
280
+ `;
281
+
282
+ 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"};"`;
283
+
284
+ exports[`Generate html document with correct lang and dir attributes. Load correct bundles. > documentation with rtl and ltr langs 8`] = `
285
+ "<!DOCTYPE html>
286
+ <html lang="ar" dir="rtl">
287
+ <head>
288
+ <meta charset="utf-8">
289
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
290
+ <base href="./" />
291
+ <title>Redirect to ./ar/index.html</title>
292
+ <meta http-equiv="refresh" content="0; url=./ar/index.html">
293
+
294
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
295
+ <script type="application/javascript">
296
+ window.location.replace("./ar/index.html");
297
+ </script>
298
+
299
+ </head>
300
+ <body class="g-root g-root_theme_light">
301
+ If you are not redirected automatically, follow this <a href="./ar/index.html">link</a>.
302
+
303
+
304
+
305
+ </body>
306
+ </html>"
361
307
  `;