@diplodoc/cli-tests 0.0.0-rc-reusable-e2es-202504041505

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 (214) hide show
  1. package/bin.mjs +30 -0
  2. package/e2e/__snapshots__/generate-map.spec.ts.snap +63 -0
  3. package/e2e/__snapshots__/include-toc.test.ts.snap +464 -0
  4. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +487 -0
  5. package/e2e/__snapshots__/metadata.spec.ts.snap +241 -0
  6. package/e2e/__snapshots__/plugin-corner-cases.spec.ts.snap +0 -0
  7. package/e2e/__snapshots__/regression.test.ts.snap +1168 -0
  8. package/e2e/__snapshots__/rtl.spec.ts.snap +357 -0
  9. package/e2e/generate-map.spec.ts +40 -0
  10. package/e2e/include-toc.test.ts +57 -0
  11. package/e2e/load-custom-resources.spec.ts +37 -0
  12. package/e2e/metadata.spec.ts +27 -0
  13. package/e2e/plugin-corner-cases.spec.ts +16 -0
  14. package/e2e/regression.test.ts +34 -0
  15. package/e2e/rtl.spec.ts +30 -0
  16. package/fixtures/cliAdapter.ts +39 -0
  17. package/fixtures/index.ts +3 -0
  18. package/fixtures/runners/binary.ts +31 -0
  19. package/fixtures/runners/index.ts +15 -0
  20. package/fixtures/runners/source.ts +20 -0
  21. package/fixtures/runners/types.ts +4 -0
  22. package/fixtures/utils/file.ts +43 -0
  23. package/fixtures/utils/test.ts +31 -0
  24. package/mocks/fileContent/metadata/authorAliasInMetadata.md +7 -0
  25. package/mocks/fileContent/metadata/fullAuthorInMetadata.md +10 -0
  26. package/mocks/fileContent/metadata/includesContent/firstIncludeFile.md +7 -0
  27. package/mocks/fileContent/metadata/includesContent/secondIncludeFile.md +5 -0
  28. package/mocks/fileContent/metadata/includesContent/withIncludes.md +7 -0
  29. package/mocks/fileContent/metadata/keywordsInMetadata.md +9 -0
  30. package/mocks/fileContent/metadata/simpleMetadata.md +6 -0
  31. package/mocks/fileContent/metadata/substitutionsInMetadataPropertyKeys.md +7 -0
  32. package/mocks/fileContent/metadata/substitutionsInMetadataPropertyValues.md +11 -0
  33. package/mocks/fileContent/metadata/substitutionsWithEmptyString.md +7 -0
  34. package/mocks/fileContent/metadata/variableInMetadata.md +7 -0
  35. package/mocks/fileContent/metadata/withAdditionalSeparatorsInContent.md +9 -0
  36. package/mocks/fileContent/metadata/withoutMetadata.md +2 -0
  37. package/mocks/fileContent/metadata/withoutMetadataWithAdditionalSeparatorsInContent.md +6 -0
  38. package/mocks/generate-map/test1/input/.yfm +0 -0
  39. package/mocks/generate-map/test1/input/ru/_includes/file.md +0 -0
  40. package/mocks/generate-map/test1/input/ru/_includes/plugins.md +0 -0
  41. package/mocks/generate-map/test1/input/ru/folder1/a1.md +1 -0
  42. package/mocks/generate-map/test1/input/ru/folder1/folder2/a1.md +1 -0
  43. package/mocks/generate-map/test1/input/ru/folder1/folder2/toc.yaml +5 -0
  44. package/mocks/generate-map/test1/input/ru/folder1/toc.yaml +7 -0
  45. package/mocks/generate-map/test1/input/ru/index.md +0 -0
  46. package/mocks/generate-map/test1/input/ru/plugins/import.md +0 -0
  47. package/mocks/generate-map/test1/input/ru/plugins/index.md +0 -0
  48. package/mocks/generate-map/test1/input/ru/project/config.md +0 -0
  49. package/mocks/generate-map/test1/input/ru/project/index.md +0 -0
  50. package/mocks/generate-map/test1/input/ru/settings.md +0 -0
  51. package/mocks/generate-map/test1/input/ru/toc.yaml +22 -0
  52. package/mocks/generate-map/test2/input/en/_includes/file.md +0 -0
  53. package/mocks/generate-map/test2/input/en/_includes/plugins.md +0 -0
  54. package/mocks/generate-map/test2/input/en/index.md +0 -0
  55. package/mocks/generate-map/test2/input/en/plugins/import.md +0 -0
  56. package/mocks/generate-map/test2/input/en/plugins/index.md +0 -0
  57. package/mocks/generate-map/test2/input/en/project/config.md +0 -0
  58. package/mocks/generate-map/test2/input/en/project/index.md +0 -0
  59. package/mocks/generate-map/test2/input/en/settings.md +0 -0
  60. package/mocks/generate-map/test2/input/en/toc.yaml +18 -0
  61. package/mocks/generate-map/test2/input/ru/_includes/file.md +0 -0
  62. package/mocks/generate-map/test2/input/ru/_includes/plugins.md +0 -0
  63. package/mocks/generate-map/test2/input/ru/index.md +0 -0
  64. package/mocks/generate-map/test2/input/ru/plugins/import.md +0 -0
  65. package/mocks/generate-map/test2/input/ru/plugins/index.md +0 -0
  66. package/mocks/generate-map/test2/input/ru/project/config.md +0 -0
  67. package/mocks/generate-map/test2/input/ru/project/index.md +0 -0
  68. package/mocks/generate-map/test2/input/ru/settings.md +0 -0
  69. package/mocks/generate-map/test2/input/ru/toc.yaml +18 -0
  70. package/mocks/generate-map/test3/input/.yfm +0 -0
  71. package/mocks/generate-map/test3/input/ru/_includes/file.md +0 -0
  72. package/mocks/generate-map/test3/input/ru/_includes/plugins.md +0 -0
  73. package/mocks/generate-map/test3/input/ru/folder1/a1.md +1 -0
  74. package/mocks/generate-map/test3/input/ru/folder1/folder2/a1.md +1 -0
  75. package/mocks/generate-map/test3/input/ru/folder1/folder2/toc.yaml +5 -0
  76. package/mocks/generate-map/test3/input/ru/folder1/toc.yaml +7 -0
  77. package/mocks/generate-map/test3/input/ru/index.md +0 -0
  78. package/mocks/generate-map/test3/input/ru/plugins/import.md +0 -0
  79. package/mocks/generate-map/test3/input/ru/plugins/index.md +0 -0
  80. package/mocks/generate-map/test3/input/ru/project/config.md +0 -0
  81. package/mocks/generate-map/test3/input/ru/project/index.md +0 -0
  82. package/mocks/generate-map/test3/input/ru/settings.md +0 -0
  83. package/mocks/generate-map/test3/input/ru/toc.yaml +22 -0
  84. package/mocks/include-toc/test1/input/a1.md +1 -0
  85. package/mocks/include-toc/test1/input/folder1/a1.md +1 -0
  86. package/mocks/include-toc/test1/input/folder1/folder2/a1.md +1 -0
  87. package/mocks/include-toc/test1/input/folder1/folder2/toc.yaml +5 -0
  88. package/mocks/include-toc/test1/input/folder1/toc.yaml +7 -0
  89. package/mocks/include-toc/test1/input/toc.yaml +9 -0
  90. package/mocks/include-toc/test2/input/.yfm +1 -0
  91. package/mocks/include-toc/test2/input/file1.md +1 -0
  92. package/mocks/include-toc/test2/input/fileX.md +1 -0
  93. package/mocks/include-toc/test2/input/folder/fileA.md +11 -0
  94. package/mocks/include-toc/test2/input/folder/fileB.md +9 -0
  95. package/mocks/include-toc/test2/input/folder/folder/fileC.md +1 -0
  96. package/mocks/include-toc/test2/input/folder/folder/toc.yaml +3 -0
  97. package/mocks/include-toc/test2/input/folder/toc.yaml +6 -0
  98. package/mocks/include-toc/test2/input/presets.yaml +2 -0
  99. package/mocks/include-toc/test2/input/toc.yaml +6 -0
  100. package/mocks/include-toc/test3/input/product1/core/_includes/inc.md +1 -0
  101. package/mocks/include-toc/test3/input/product1/core/article1.md +3 -0
  102. package/mocks/include-toc/test3/input/product1/core/toc_m.yaml +2 -0
  103. package/mocks/include-toc/test3/input/product1/product/toc_p.yaml +3 -0
  104. package/mocks/include-toc/test3/input/product1/toc.yaml +3 -0
  105. package/mocks/include-toc/test3/input/product2/core/_includes/inc.md +1 -0
  106. package/mocks/include-toc/test3/input/product2/core/article1.md +3 -0
  107. package/mocks/include-toc/test3/input/product2/core/toc_m.yaml +2 -0
  108. package/mocks/include-toc/test3/input/product2/overlay1/product/article1.md +3 -0
  109. package/mocks/include-toc/test3/input/product2/overlay1/product/toc_p.yaml +3 -0
  110. package/mocks/include-toc/test3/input/product2/overlay1/toc.yaml +2 -0
  111. package/mocks/include-toc/test3/input/product2/overlay2/product/article1.md +3 -0
  112. package/mocks/include-toc/test3/input/product2/overlay2/product/toc_p.yaml +3 -0
  113. package/mocks/include-toc/test3/input/product2/overlay2/toc.yaml +2 -0
  114. package/mocks/include-toc/test3/input/product2/overlay3/product/toc_p.yaml +3 -0
  115. package/mocks/include-toc/test3/input/product2/overlay3/toc.yaml +2 -0
  116. package/mocks/include-toc/test3/input/product2/p2.md +4 -0
  117. package/mocks/include-toc/test3/input/product2/toc.yaml +10 -0
  118. package/mocks/include-toc/test4/input/a1.md +1 -0
  119. package/mocks/include-toc/test4/input/index.yaml +20 -0
  120. package/mocks/include-toc/test4/input/toc.yaml +9 -0
  121. package/mocks/include-toc/test5/input/core/concepts/toc_i.yaml +2 -0
  122. package/mocks/include-toc/test5/input/core/concepts/toc_p.yaml +3 -0
  123. package/mocks/include-toc/test5/input/core/toc_i.yaml +6 -0
  124. package/mocks/include-toc/test5/input/core/toc_m.yaml +3 -0
  125. package/mocks/include-toc/test5/input/core/toc_p.yaml +5 -0
  126. package/mocks/include-toc/test5/input/overlay/toc_p.yaml +3 -0
  127. package/mocks/include-toc/test5/input/toc.yaml +4 -0
  128. package/mocks/include-toc/test6/input/test/index.md +4 -0
  129. package/mocks/include-toc/test6/input/test/sub/sub/sub-3.md +1 -0
  130. package/mocks/include-toc/test6/input/test/sub/sub-1.md +5 -0
  131. package/mocks/include-toc/test6/input/test/sub/sub-2.md +1 -0
  132. package/mocks/include-toc/test6/input/test/test.md +1 -0
  133. package/mocks/include-toc/test6/input/toc.yaml +7 -0
  134. package/mocks/include-toc/test7/input/.yfm +1 -0
  135. package/mocks/include-toc/test7/input/ru/presets.yaml +2 -0
  136. package/mocks/include-toc/test7/input/ru/sub/folder/index.yaml +4 -0
  137. package/mocks/include-toc/test7/input/ru/sub/folder/toc.yaml +3 -0
  138. package/mocks/include-toc/test7/input/ru/toc.yaml +3 -0
  139. package/mocks/load-custom-resources/md2html-with-resources/input/.yfm +5 -0
  140. package/mocks/load-custom-resources/md2html-with-resources/input/_assets/script/test1.js +0 -0
  141. package/mocks/load-custom-resources/md2html-with-resources/input/_assets/style/test.css +13 -0
  142. package/mocks/load-custom-resources/md2html-with-resources/input/index.yaml +9 -0
  143. package/mocks/load-custom-resources/md2html-with-resources/input/page.md +7 -0
  144. package/mocks/load-custom-resources/md2html-with-resources/input/project/config.md +1 -0
  145. package/mocks/load-custom-resources/md2html-with-resources/input/toc.yaml +7 -0
  146. package/mocks/load-custom-resources/md2md-with-resources/input/.yfm +5 -0
  147. package/mocks/load-custom-resources/md2md-with-resources/input/_assets/script/test1.js +0 -0
  148. package/mocks/load-custom-resources/md2md-with-resources/input/_assets/style/test.css +13 -0
  149. package/mocks/load-custom-resources/md2md-with-resources/input/index.yaml +9 -0
  150. package/mocks/load-custom-resources/md2md-with-resources/input/page.md +7 -0
  151. package/mocks/load-custom-resources/md2md-with-resources/input/project/config.md +1 -0
  152. package/mocks/load-custom-resources/md2md-with-resources/input/toc.yaml +7 -0
  153. package/mocks/load-custom-resources/single-page-with-resources/input/.yfm +5 -0
  154. package/mocks/load-custom-resources/single-page-with-resources/input/_assets/script/test1.js +0 -0
  155. package/mocks/load-custom-resources/single-page-with-resources/input/_assets/style/test.css +13 -0
  156. package/mocks/load-custom-resources/single-page-with-resources/input/index.yaml +9 -0
  157. package/mocks/load-custom-resources/single-page-with-resources/input/page.md +7 -0
  158. package/mocks/load-custom-resources/single-page-with-resources/input/project/config.md +1 -0
  159. package/mocks/load-custom-resources/single-page-with-resources/input/toc.yaml +7 -0
  160. package/mocks/metadata/md2html-with-metadata/input/index.yaml +9 -0
  161. package/mocks/metadata/md2html-with-metadata/input/page.md +7 -0
  162. package/mocks/metadata/md2html-with-metadata/input/presets.yaml +6 -0
  163. package/mocks/metadata/md2html-with-metadata/input/project/config.md +7 -0
  164. package/mocks/metadata/md2html-with-metadata/input/toc.yaml +7 -0
  165. package/mocks/metadata/md2md-with-metadata/input/index.yaml +9 -0
  166. package/mocks/metadata/md2md-with-metadata/input/page.md +7 -0
  167. package/mocks/metadata/md2md-with-metadata/input/presets.yaml +6 -0
  168. package/mocks/metadata/md2md-with-metadata/input/project/config.md +7 -0
  169. package/mocks/metadata/md2md-with-metadata/input/toc.yaml +7 -0
  170. package/mocks/plugin-corner-cases/images-in-deflists/input/image.jpeg +0 -0
  171. package/mocks/plugin-corner-cases/images-in-deflists/input/index.md +5 -0
  172. package/mocks/plugin-corner-cases/images-in-deflists/input/toc.yaml +4 -0
  173. package/mocks/regression/input/1.md +27 -0
  174. package/mocks/regression/input/_assets/1.png +0 -0
  175. package/mocks/regression/input/_assets/2.png +0 -0
  176. package/mocks/regression/input/_assets/3.png +0 -0
  177. package/mocks/regression/input/_assets/4.png +0 -0
  178. package/mocks/regression/input/_assets/empty.pdf +0 -0
  179. package/mocks/regression/input/autotitle.md +23 -0
  180. package/mocks/regression/input/commented-include.md +3 -0
  181. package/mocks/regression/input/images.md +9 -0
  182. package/mocks/regression/input/included-item.md +13 -0
  183. package/mocks/regression/input/includes/presets.yaml +2 -0
  184. package/mocks/regression/input/includes/test.md +1 -0
  185. package/mocks/regression/input/includes/user.md +1 -0
  186. package/mocks/regression/input/includes.md +5 -0
  187. package/mocks/regression/input/index.yaml +9 -0
  188. package/mocks/regression/input/latex.md +3 -0
  189. package/mocks/regression/input/merge/merge.md +3 -0
  190. package/mocks/regression/input/merge/presets.yaml +2 -0
  191. package/mocks/regression/input/merge/toc.yaml +4 -0
  192. package/mocks/regression/input/merge-source/merged.md +3 -0
  193. package/mocks/regression/input/merge-source/toc-m.yaml +4 -0
  194. package/mocks/regression/input/mermaid.md +13 -0
  195. package/mocks/regression/input/openapi-spec.yaml +37 -0
  196. package/mocks/regression/input/presets.yaml +8 -0
  197. package/mocks/regression/input/sub/folder/item-1.md +3 -0
  198. package/mocks/regression/input/sub/toc.yaml +5 -0
  199. package/mocks/regression/input/toc-i.yaml +3 -0
  200. package/mocks/regression/input/toc.yaml +30 -0
  201. package/mocks/rtl/multidirectional-languages/input/.yfm +1 -0
  202. package/mocks/rtl/multidirectional-languages/input/ar/index.yaml +4 -0
  203. package/mocks/rtl/multidirectional-languages/input/ar/page.md +1 -0
  204. package/mocks/rtl/multidirectional-languages/input/ar/toc.yaml +5 -0
  205. package/mocks/rtl/multidirectional-languages/input/en/index.yaml +9 -0
  206. package/mocks/rtl/multidirectional-languages/input/en/page.md +7 -0
  207. package/mocks/rtl/multidirectional-languages/input/en/toc.yaml +5 -0
  208. package/mocks/rtl/rtl-language/input/.yfm +1 -0
  209. package/mocks/rtl/rtl-language/input/index.yaml +4 -0
  210. package/mocks/rtl/rtl-language/input/page.md +1 -0
  211. package/mocks/rtl/rtl-language/input/toc.yaml +5 -0
  212. package/package.json +42 -0
  213. package/tsconfig.json +16 -0
  214. package/vitest.config.ts +30 -0
@@ -0,0 +1,31 @@
1
+ import {spawn} from 'child_process';
2
+ import {Runner} from './types';
3
+
4
+ export class BinaryRunner implements Runner {
5
+ private readonly binaryPath: string;
6
+
7
+ constructor(binaryPath: string) {
8
+ this.binaryPath = binaryPath;
9
+ }
10
+
11
+ runYfmDocs(argv: string[]): Promise<void> {
12
+ return this.spawnAsync(argv);
13
+ }
14
+
15
+ private spawnAsync(argv: string[]): Promise<void> {
16
+ return new Promise((resolve, reject) => {
17
+ const child = spawn(this.binaryPath, argv, {
18
+ stdio: 'inherit',
19
+ });
20
+
21
+ child.on('error', reject);
22
+ child.on('exit', (code) => {
23
+ if (code === 0) {
24
+ resolve();
25
+ } else {
26
+ reject(new Error(`Process exited with code ${code}`));
27
+ }
28
+ });
29
+ });
30
+ }
31
+ }
@@ -0,0 +1,15 @@
1
+ import {SourceRunner} from './source';
2
+ import {BinaryRunner} from './binary';
3
+ import {Runner} from './types';
4
+
5
+ export {Runner};
6
+
7
+ export function createRunner(): Runner {
8
+ const binaryPath = process.env.DIPLODOC_BINARY_PATH;
9
+
10
+ if (binaryPath) {
11
+ return new BinaryRunner(binaryPath);
12
+ }
13
+
14
+ return new SourceRunner();
15
+ }
@@ -0,0 +1,20 @@
1
+ export class SourceRunner {
2
+ private readonly cliPath: string;
3
+
4
+ constructor() {
5
+ // Allow overriding the CLI path via environment variable, otherwise use local build
6
+ this.cliPath = process.env.DIPLODOC_CLI_BUILD_PATH || require.resolve('../../../build');
7
+ }
8
+
9
+ async runYfmDocs(argv: string[]): Promise<void> {
10
+ const {run} = await import(this.cliPath);
11
+
12
+ const baseArgs = ['node', this.cliPath, ...argv];
13
+
14
+ const exitCode = await run(baseArgs);
15
+
16
+ if (exitCode !== 0) {
17
+ throw new Error(`CLI exited with code ${exitCode}`);
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,4 @@
1
+ export interface Runner {
2
+ runYfmDocs(argv: string[]): Promise<void>;
3
+ }
4
+
@@ -0,0 +1,43 @@
1
+ import {readFileSync} from 'fs';
2
+ import {join, resolve} from 'path';
3
+ import walkSync from 'walk-sync';
4
+ import {bundleless, platformless} from './test';
5
+ import {expect} from 'vitest';
6
+ import shell from 'shelljs';
7
+
8
+ export function getFileContent(filePath: string) {
9
+ return bundleless(platformless(readFileSync(filePath, 'utf8')));
10
+ }
11
+
12
+ const uselessFile = (file: string) =>
13
+ !['_bundle/', '_assets/', '_search/'].some((part) => file.includes(part));
14
+
15
+ export function compareDirectories(outputPath: string): void {
16
+ const filesFromOutput = walkSync(outputPath, {
17
+ directories: false,
18
+ includeBasePath: false,
19
+ }).sort();
20
+
21
+ expect(bundleless(JSON.stringify(filesFromOutput, null, 2))).toMatchSnapshot('filelist');
22
+
23
+ filesFromOutput.filter(uselessFile).forEach((filePath) => {
24
+ const content = getFileContent(resolve(outputPath, filePath));
25
+ expect(content).toMatchSnapshot(filePath);
26
+ });
27
+ }
28
+
29
+ type TestPaths = {
30
+ inputPath: string;
31
+ outputPath: string;
32
+ }
33
+
34
+ export function getTestPaths(testRootPath: string): TestPaths {
35
+ return {
36
+ inputPath: resolve(__dirname, '../../', join(testRootPath, 'input')),
37
+ outputPath: resolve(__dirname, '../../', join(testRootPath, 'output')),
38
+ };
39
+ }
40
+
41
+ export function cleanupDirectory(path: string): void {
42
+ shell.rm('-rf', path);
43
+ }
@@ -0,0 +1,31 @@
1
+ import {readFileSync} from 'fs';
2
+
3
+ export function platformless(text: string): string {
4
+ return text
5
+ .replace(/\r\n/g, '\n')
6
+ .replace(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/g, 'UUID')
7
+ .replace(/(content"?[:=]{1}[" ]{1}Diplodoc.*? )v\d+\.\d+\.\d+/g, `$1vDIPLODOC-VERSION`)
8
+ .replace(/(\\(?![/"'])){1,2}/g, '/');
9
+ }
10
+
11
+ export function bundleless(text: string): string {
12
+ const assets = require('@diplodoc/client/manifest') as Record<string, Record<string, string[]>>;
13
+
14
+ for (const [entryKey, entry] of Object.entries(assets)) {
15
+ for (const [typeKey, type] of Object.entries(entry)) {
16
+ for (let index = 0; index < type.length; index++) {
17
+ let prev = '';
18
+ while (prev !== text) {
19
+ prev = text;
20
+ text = text.replace(type[index], `${entryKey}-${typeKey}-${index}`);
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ return text;
27
+ }
28
+
29
+ export function getNormalizedContent(filePath: string): string {
30
+ return bundleless(platformless(readFileSync(filePath, 'utf8')));
31
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Author alias in metadata
3
+ author: alias123
4
+ ---
5
+
6
+ # Header
7
+ Some text
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: Full author in metadata
3
+ author:
4
+ avatar: https://example/icons/logo.png
5
+ name: Author Name
6
+ url: https://site.ru
7
+ ---
8
+
9
+ # Header
10
+ Some text
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: First include file
3
+ ---
4
+ # Header
5
+ Some text
6
+
7
+ {% include [secondIncludeFile](./secondIncludeFile.md) %}
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Second include file
3
+ ---
4
+ # Header
5
+ Some text
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: With includes
3
+ ---
4
+ # Header
5
+ Some text
6
+
7
+ {% include [firstIncludeFile](./firstIncludeFile.md) %}
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: Keywords in metadata
3
+ keywords:
4
+ - keyword 1
5
+ - keyword 2
6
+ ---
7
+
8
+ # Header
9
+ Some text
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: Simple metadata
3
+ editable: false
4
+ ---
5
+ # Header
6
+ Some text
@@ -0,0 +1,7 @@
1
+ ---
2
+ prop-{{key-name}}: This one has a substitution in a key name.
3
+ {{key-name}}-prop: This one's key starts with a substitution.
4
+ {{key-name}}: This one's key only consists of a substitution.
5
+ {{ key-name }}: This one's key employs a different whitespace style in a substitution.
6
+ ---
7
+ Blah.
@@ -0,0 +1,11 @@
1
+ ---
2
+ prop1: "This is a metadata property with a {{substitution}} in it."
3
+ prop2: "This one contains {{multiple}} {{substitutions}}."
4
+ prop3: "This one has {{substitutions}} of {{ different }} {{ styles}}."
5
+ prop4: 'This one has a {{substitution}} as well, but the string literal is single-quoted.'
6
+ prop5: This one has no quotes at {{all}}.
7
+ prop6: {{this}} starts with a substitution.
8
+ prop7: >-
9
+ {{this}} one is a multiline {{property}}.
10
+ ---
11
+ Blah.
@@ -0,0 +1,7 @@
1
+ ---
2
+ prop1: {{var}}
3
+ prop2: '{{var}}'
4
+ prop3: '{{var}}'
5
+ prop4: >-
6
+ {{var}}
7
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Variable in metadata
3
+ description: {{variable}} description
4
+ ---
5
+
6
+ # Header
7
+ Some text
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: With additional separators in content
3
+ ---
4
+ # Header
5
+ Some text
6
+
7
+ ---
8
+ Some text
9
+ ---
@@ -0,0 +1,2 @@
1
+ # Header
2
+ Some text
@@ -0,0 +1,6 @@
1
+ # Header
2
+ Some text
3
+
4
+ ---
5
+ Some text
6
+ ---
File without changes
@@ -0,0 +1 @@
1
+ This is the /folder1/a1.md file content.
@@ -0,0 +1 @@
1
+ This is the /folder1/folder1/a1.md file content.
@@ -0,0 +1,5 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+
5
+
@@ -0,0 +1,7 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+ - name: folder1
5
+ include:
6
+ mode: link
7
+ path: folder2/toc.yaml
File without changes
File without changes
@@ -0,0 +1,22 @@
1
+ title: Yandex Flavored Markdown
2
+ items:
3
+ - name: Yandex Flavored Markdown
4
+ href: index.md
5
+ - name: Settings
6
+ href: settings.md
7
+ - name: Plugins
8
+ items:
9
+ - name: Overview
10
+ href: plugins/index.md
11
+ - name: Adding additional plugins
12
+ href: plugins/import.md
13
+ - name: Organizing a YFM project
14
+ items:
15
+ - name: Overview
16
+ href: project/index.md
17
+ - name: Configuration file
18
+ href: project/config.md
19
+ - name: folder1
20
+ include:
21
+ mode: link
22
+ path: folder1/toc.yaml
File without changes
File without changes
@@ -0,0 +1,18 @@
1
+ title: Yandex Flavored Markdown
2
+ items:
3
+ - name: Yandex Flavored Markdown
4
+ href: index.md
5
+ - name: Settings
6
+ href: settings.md
7
+ - name: Plugins
8
+ items:
9
+ - name: Overview
10
+ href: plugins/index.md
11
+ - name: Adding additional plugins
12
+ href: plugins/import.md
13
+ - name: Organizing a YFM project
14
+ items:
15
+ - name: Overview
16
+ href: project/index.md
17
+ - name: Configuration file
18
+ href: project/config.md
File without changes
File without changes
@@ -0,0 +1,18 @@
1
+ title: Yandex Flavored Markdown
2
+ items:
3
+ - name: Yandex Flavored Markdown
4
+ href: index.md
5
+ - name: Settings
6
+ href: settings.md
7
+ - name: Plugins
8
+ items:
9
+ - name: Overview
10
+ href: plugins/index.md
11
+ - name: Adding additional plugins
12
+ href: plugins/import.md
13
+ - name: Organizing a YFM project
14
+ items:
15
+ - name: Overview
16
+ href: project/index.md
17
+ - name: Configuration file
18
+ href: project/config.md
File without changes
@@ -0,0 +1 @@
1
+ This is the /folder1/a1.md file content.
@@ -0,0 +1 @@
1
+ This is the /folder1/folder1/a1.md file content.
@@ -0,0 +1,5 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+
5
+
@@ -0,0 +1,7 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+ - name: folder1
5
+ include:
6
+ mode: link
7
+ path: folder2/toc.yaml
File without changes
File without changes
@@ -0,0 +1,22 @@
1
+ title: Yandex Flavored Markdown
2
+ items:
3
+ - name: Yandex Flavored Markdown
4
+ href: index.md
5
+ - name: Settings
6
+ href: settings.md
7
+ - name: Plugins
8
+ items:
9
+ - name: Overview
10
+ href: plugins/index.md
11
+ - name: Adding additional plugins
12
+ href: https://test.ru
13
+ - name: Organizing a YFM project
14
+ items:
15
+ - name: Overview
16
+ href: project/index.md
17
+ - name: Configuration file
18
+ href: https://test.ru
19
+ - name: folder1
20
+ include:
21
+ mode: link
22
+ path: folder1/toc.yaml
@@ -0,0 +1 @@
1
+ This is the /a1.md file content.
@@ -0,0 +1 @@
1
+ This is the /folder1/a1.md file content.
@@ -0,0 +1 @@
1
+ This is the /folder1/folder1/a1.md file content.
@@ -0,0 +1,5 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+
5
+
@@ -0,0 +1,7 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+ - name: folder1
5
+ include:
6
+ mode: link
7
+ path: folder2/toc.yaml
@@ -0,0 +1,9 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
4
+ - name: folder1
5
+ include:
6
+ mode: link
7
+ path: folder1/toc.yaml
8
+
9
+
@@ -0,0 +1 @@
1
+ applyPresets: true
@@ -0,0 +1 @@
1
+ # File 1
@@ -0,0 +1 @@
1
+ # File X
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: File A
3
+ description: {{product}} description
4
+ ---
5
+ # File A
6
+
7
+ ---
8
+
9
+ Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
10
+
11
+ ---
@@ -0,0 +1,9 @@
1
+ # File B
2
+
3
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry.
4
+
5
+ ---
6
+
7
+ Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
8
+
9
+ ---
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: NameC
3
+ href: fileC.md
@@ -0,0 +1,6 @@
1
+ items:
2
+ - name: NameA
3
+ href: fileA.md
4
+ - name: NameB
5
+ href: fileB.md
6
+ - include: {path: folder/folder/toc.yaml }
@@ -0,0 +1,2 @@
1
+ default:
2
+ product: YFM
@@ -0,0 +1,6 @@
1
+ items:
2
+ - name: Name1
3
+ href: file1.md
4
+ - include: { path: folder/toc.yaml }
5
+ - name: NameX
6
+ href: fileX.md
@@ -0,0 +1 @@
1
+ This is the core include.
@@ -0,0 +1,3 @@
1
+ This is the core content of Article 1.
2
+
3
+ {% include [x](_includes/inc.md) %}
@@ -0,0 +1,2 @@
1
+ items:
2
+ - include: { mode: merge, path: product/toc_p.yaml }
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: Article1
3
+ href: article1.md
@@ -0,0 +1,3 @@
1
+ title: Product 1 title
2
+ items:
3
+ - include: { mode: merge, path: core/toc_m.yaml }
@@ -0,0 +1 @@
1
+ This is the core include.
@@ -0,0 +1,3 @@
1
+ This is the core content of Article 1.
2
+
3
+ {% include [x](_includes/inc.md) %}
@@ -0,0 +1,2 @@
1
+ items:
2
+ - include: { mode: merge, path: product/toc_p.yaml }
@@ -0,0 +1,3 @@
1
+ This is the overlay content of Article 1 for product 2.
2
+
3
+ {% include [x](_includes/inc.md) %}
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: Article1
3
+ href: article1.md