From a9a873bd5624c305be52b80af2f4271e17c620a9 Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 25 Mar 2024 20:40:25 +0800 Subject: [PATCH 01/30] Add mermaid plugin --- packages/core/src/plugins/mermaid.ts | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 packages/core/src/plugins/mermaid.ts diff --git a/packages/core/src/plugins/mermaid.ts b/packages/core/src/plugins/mermaid.ts new file mode 100644 index 0000000000..996c140017 --- /dev/null +++ b/packages/core/src/plugins/mermaid.ts @@ -0,0 +1,37 @@ +import { PluginContext } from './Plugin'; +import { NodeOrText } from '../utils/node'; + +const DEFAULT_CDN_ADDRESS = 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs'; +const DEFAULT_CONFIG = '{"startOnLoad":true}'; + +function genScript(address: string, config: string) { + return ``; +} + +export = { + tagConfig: { + mermaid: { + isSpecial: true, + }, + }, + getScripts: (pluginContext: PluginContext) => [genScript(pluginContext.address, pluginContext.config)], + processNode: (_: PluginContext, node: NodeOrText) => { + if (node.name !== 'mermaid') { + return; + } + node.name = 'div'; + if (!node.attribs) { + node.attribs = {}; + } else { + node.attribs.class = 'mermaid'; + node.attribs['v-mermaid'] = ''; + } + }, +}; From a22da8e3c0e7e20735365b54623ade44c13e085b Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 25 Mar 2024 20:45:58 +0800 Subject: [PATCH 02/30] Improve code quality --- packages/core/src/plugins/mermaid.ts | 42 +++++++++++++--------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/packages/core/src/plugins/mermaid.ts b/packages/core/src/plugins/mermaid.ts index 996c140017..7434a68f06 100644 --- a/packages/core/src/plugins/mermaid.ts +++ b/packages/core/src/plugins/mermaid.ts @@ -1,18 +1,16 @@ -import { PluginContext } from './Plugin'; -import { NodeOrText } from '../utils/node'; +import cheerio from 'cheerio'; +import { PluginContext, FrontMatter } from './Plugin'; const DEFAULT_CDN_ADDRESS = 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs'; -const DEFAULT_CONFIG = '{"startOnLoad":true}'; -function genScript(address: string, config: string) { +function genScript(address: string) { return ``; + import mermaid from '${address || DEFAULT_CDN_ADDRESS}'; + Vue.directive('mermaid', { + inserted: function(el) { + mermaid.init(undefined, el); + }}); + `; } export = { @@ -21,17 +19,15 @@ export = { isSpecial: true, }, }, - getScripts: (pluginContext: PluginContext) => [genScript(pluginContext.address, pluginContext.config)], - processNode: (_: PluginContext, node: NodeOrText) => { - if (node.name !== 'mermaid') { - return; - } - node.name = 'div'; - if (!node.attribs) { - node.attribs = {}; - } else { - node.attribs.class = 'mermaid'; - node.attribs['v-mermaid'] = ''; - } + getScripts: (pluginContext: PluginContext) => [genScript(pluginContext.address)], + postRender: (pluginContext: PluginContext, frontmatter: FrontMatter, content: string) => { + const $ = cheerio.load(content); + + $('mermaid').each((index: number, node: cheerio.Element) => { + const $node = $(node); + $node.replaceWith(`
${$node.html()}
`); + }); + + return $.html(); }, }; From 968378b9025536367746d576ef2f606e9f4d07d1 Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 25 Mar 2024 23:37:26 +0800 Subject: [PATCH 03/30] Improve code quality --- packages/core/src/plugins/mermaid.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/core/src/plugins/mermaid.ts b/packages/core/src/plugins/mermaid.ts index 7434a68f06..73f7c9e1c0 100644 --- a/packages/core/src/plugins/mermaid.ts +++ b/packages/core/src/plugins/mermaid.ts @@ -1,15 +1,20 @@ import cheerio from 'cheerio'; import { PluginContext, FrontMatter } from './Plugin'; -const DEFAULT_CDN_ADDRESS = 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs'; +const DEFAULT_CDN_ADDRESS = 'https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs'; function genScript(address: string) { return ``; } From 5baf061dc09207b47b84efdfd4f9be1dc15df781 Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 1 Apr 2024 12:44:12 +0800 Subject: [PATCH 04/30] Add unit test --- .../test/unit/plugins/default/mermaid.test.ts | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 packages/core/test/unit/plugins/default/mermaid.test.ts diff --git a/packages/core/test/unit/plugins/default/mermaid.test.ts b/packages/core/test/unit/plugins/default/mermaid.test.ts new file mode 100644 index 0000000000..614dc7e550 --- /dev/null +++ b/packages/core/test/unit/plugins/default/mermaid.test.ts @@ -0,0 +1,80 @@ +import cheerio from 'cheerio'; +import { PluginContext, FrontMatter } from '../../../../src/plugins/Plugin'; +import mermaid from '../../../../src/plugins/mermaid'; + +test('postRender should replace mermaid tags with appropriate divs', () => { + const content = ` + + flowchart TD + A[Start] --> B{Is it?} + B -->|Yes| C[OK] + C --> D[Rethink] + D --> B + B ---->|No| E[End] + + `; + + const expected = ` +
+ flowchart TD + A[Start] --> B{Is it?} + B -->|Yes| C[OK] + C --> D[Rethink] + D --> B + B ---->|No| E[End] +
+ `; + + const pluginContext: PluginContext = {}; + const frontmatter: FrontMatter = {}; + const renderedContent = mermaid.postRender(pluginContext, frontmatter, content); + const $ = cheerio.load(renderedContent); + + expect($('div.mermaid').length).toBe(1); + expect($('div.mermaid').attr('v-mermaid')).toBeDefined(); + expect($('div.mermaid').html()).toEqual(cheerio.load(expected)('div.mermaid').html()); +}); + +test('getScripts should return the correct script tag', () => { + const pluginContext: PluginContext = { + address: 'https://unpkg.com/mermaid@8/dist/mermaid.esm.min.mjs', + }; + + const expectedScript = ``; + + const scripts = mermaid.getScripts(pluginContext); + expect(scripts.length).toBe(1); + expect(scripts[0]).toEqual(expectedScript); +}); + +test('getScripts should use the default CDN address if not provided', () => { + const pluginContext: PluginContext = {}; + + const expectedScript = ``; + + const scripts = mermaid.getScripts(pluginContext); + expect(scripts.length).toBe(1); + expect(scripts[0]).toEqual(expectedScript); +}); From 1d484188b656ef9b9158ac645581895dfa615414 Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 1 Apr 2024 12:56:02 +0800 Subject: [PATCH 05/30] Add functional test --- .../test_site/expected/bugs/index.html | 12 + .../functional/test_site/expected/index.html | 12 + .../test_site/expected/siteData.json | 6 + .../test_site/expected/sub_site/index.html | 12 + .../sub_site/nested_sub_site/index.html | 12 + .../testNunjucksPathResolving.html | 12 + .../sub_site/testNunjucksPathResolving.html | 12 + .../testAltFrontMatterInvalidKeyValue.html | 12 + .../expected/testAltFrontMatterParsing.html | 12 + .../expected/testAnchorGeneration.html | 12 + .../test_site/expected/testAnnotate.html | 12 + .../expected/testAntiFOUCStyles.html | 12 + .../test_site/expected/testCenterText.html | 12 + .../test_site/expected/testCodeBlocks.html | 12 + .../test_site/expected/testDates.html | 12 + .../expected/testEmptyAltFrontMatter.html | 12 + .../expected/testEmptyFrontmatter.html | 12 + .../expected/testExternalScripts.html | 12 + .../expected/testFontAwesomeInPage.html | 12 + .../expected/testGlyphiconInPage.html | 12 + .../functional/test_site/expected/testHr.html | 12 + .../expected/testIconsInSiteLayout.html | 12 + .../test_site/expected/testImages.html | 12 + .../expected/testIncludeBoilerplate.html | 12 + .../expected/testIncludeMultipleModals.html | 12 + .../expected/testIncludePluginsRendered.html | 12 + .../test_site/expected/testLayouts.html | 12 + .../expected/testLayoutsOverride.html | 12 + ...testLayoutsOverrideWithAltFrontmatter.html | 12 + .../testLayoutsWithAltFrontMatter.html | 12 + .../test_site/expected/testLinks.html | 12 + .../test_site/expected/testList.html | 12 + .../expected/testMaterialIconsInPage.html | 12 + .../test_site/expected/testMath.html | 12 + .../test_site/expected/testMermaid.html | 352 ++++++++++++++++++ .../expected/testMermaid.page-vue-render.js | 19 + .../test_site/expected/testModals.html | 12 + .../expected/testNunjucksPathResolving.html | 12 + .../test_site/expected/testOcticonInPage.html | 12 + .../test_site/expected/testPageNav.html | 12 + .../test_site/expected/testPageNavPrint.html | 12 + .../test_site/expected/testPageNavTarget.html | 12 + .../expected/testPageNavWithOnlyTitle.html | 12 + ...testPageNavWithoutTitleAndNavHeadings.html | 12 + .../expected/testPanelMarkdownParsing.html | 12 + .../test_site/expected/testPanels.html | 12 + .../expected/testPanelsClosingTransition.html | 12 + .../test_site/expected/testPlantUML.html | 12 + .../expected/testPopoverTrigger.html | 12 + .../test_site/expected/testPopovers.html | 12 + .../expected/testSingleAltFrontMatter.html | 12 + .../expected/testSourceContainScript.html | 12 + .../test_site/expected/testThumbnails.html | 12 + .../expected/testTooltipSpacing.html | 12 + .../test_site/expected/testTree.html | 12 + .../expected/testVariableContainsInclude.html | 12 + .../expected/testWeb3FormPlugin.html | 12 + .../test_site/expected/test_md_fragment.html | 12 + .../cli/test/functional/test_site/site.json | 7 +- .../test/functional/test_site/testMermaid.md | 69 ++++ .../expected/diagrams/example.png | Bin 10112 -> 10649 bytes 61 files changed, 1112 insertions(+), 1 deletion(-) create mode 100644 packages/cli/test/functional/test_site/expected/testMermaid.html create mode 100644 packages/cli/test/functional/test_site/expected/testMermaid.page-vue-render.js create mode 100644 packages/cli/test/functional/test_site/testMermaid.md diff --git a/packages/cli/test/functional/test_site/expected/bugs/index.html b/packages/cli/test/functional/test_site/expected/bugs/index.html index 057cc6dfb4..c43a9d3001 100644 --- a/packages/cli/test/functional/test_site/expected/bugs/index.html +++ b/packages/cli/test/functional/test_site/expected/bugs/index.html @@ -279,5 +279,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/index.html b/packages/cli/test/functional/test_site/expected/index.html index 6b32da8130..c1f32a213f 100644 --- a/packages/cli/test/functional/test_site/expected/index.html +++ b/packages/cli/test/functional/test_site/expected/index.html @@ -930,5 +930,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/siteData.json b/packages/cli/test/functional/test_site/expected/siteData.json index 567c2ddca7..4975408852 100644 --- a/packages/cli/test/functional/test_site/expected/siteData.json +++ b/packages/cli/test/functional/test_site/expected/siteData.json @@ -462,6 +462,12 @@ "h1-text": "\n\n\n h1 text\n \n" }, "headingKeywords": {} + }, + { + "src": "testMermaid.md", + "title": "Rendering of diagrams via mermaid-js", + "headings": {}, + "headingKeywords": {} } ] } diff --git a/packages/cli/test/functional/test_site/expected/sub_site/index.html b/packages/cli/test/functional/test_site/expected/sub_site/index.html index d16df81a54..a012aae7b1 100644 --- a/packages/cli/test/functional/test_site/expected/sub_site/index.html +++ b/packages/cli/test/functional/test_site/expected/sub_site/index.html @@ -286,5 +286,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/index.html b/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/index.html index cea632ed1b..c13d0a7c64 100644 --- a/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/index.html +++ b/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/index.html @@ -277,5 +277,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/testNunjucksPathResolving.html b/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/testNunjucksPathResolving.html index 0476a7b136..72ff3dfea0 100644 --- a/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/testNunjucksPathResolving.html +++ b/packages/cli/test/functional/test_site/expected/sub_site/nested_sub_site/testNunjucksPathResolving.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/sub_site/testNunjucksPathResolving.html b/packages/cli/test/functional/test_site/expected/sub_site/testNunjucksPathResolving.html index 0476a7b136..72ff3dfea0 100644 --- a/packages/cli/test/functional/test_site/expected/sub_site/testNunjucksPathResolving.html +++ b/packages/cli/test/functional/test_site/expected/sub_site/testNunjucksPathResolving.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testAltFrontMatterInvalidKeyValue.html b/packages/cli/test/functional/test_site/expected/testAltFrontMatterInvalidKeyValue.html index 2394a781ce..478a17e46e 100644 --- a/packages/cli/test/functional/test_site/expected/testAltFrontMatterInvalidKeyValue.html +++ b/packages/cli/test/functional/test_site/expected/testAltFrontMatterInvalidKeyValue.html @@ -277,5 +277,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testAltFrontMatterParsing.html b/packages/cli/test/functional/test_site/expected/testAltFrontMatterParsing.html index b0f96e8fad..8bde9d4cf5 100644 --- a/packages/cli/test/functional/test_site/expected/testAltFrontMatterParsing.html +++ b/packages/cli/test/functional/test_site/expected/testAltFrontMatterParsing.html @@ -276,5 +276,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testAnchorGeneration.html b/packages/cli/test/functional/test_site/expected/testAnchorGeneration.html index 9f86039578..35ea0574e0 100644 --- a/packages/cli/test/functional/test_site/expected/testAnchorGeneration.html +++ b/packages/cli/test/functional/test_site/expected/testAnchorGeneration.html @@ -345,5 +345,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testAnnotate.html b/packages/cli/test/functional/test_site/expected/testAnnotate.html index 94877f920c..a1c4ba4070 100644 --- a/packages/cli/test/functional/test_site/expected/testAnnotate.html +++ b/packages/cli/test/functional/test_site/expected/testAnnotate.html @@ -456,5 +456,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testAntiFOUCStyles.html b/packages/cli/test/functional/test_site/expected/testAntiFOUCStyles.html index f3f7a30ae1..d075b9e68c 100644 --- a/packages/cli/test/functional/test_site/expected/testAntiFOUCStyles.html +++ b/packages/cli/test/functional/test_site/expected/testAntiFOUCStyles.html @@ -300,5 +300,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testCenterText.html b/packages/cli/test/functional/test_site/expected/testCenterText.html index 8c6070cd64..c853efde13 100644 --- a/packages/cli/test/functional/test_site/expected/testCenterText.html +++ b/packages/cli/test/functional/test_site/expected/testCenterText.html @@ -276,5 +276,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testCodeBlocks.html b/packages/cli/test/functional/test_site/expected/testCodeBlocks.html index 24989e8bd9..33ae98e41a 100644 --- a/packages/cli/test/functional/test_site/expected/testCodeBlocks.html +++ b/packages/cli/test/functional/test_site/expected/testCodeBlocks.html @@ -499,5 +499,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testDates.html b/packages/cli/test/functional/test_site/expected/testDates.html index 71b850bf53..695dc833ee 100644 --- a/packages/cli/test/functional/test_site/expected/testDates.html +++ b/packages/cli/test/functional/test_site/expected/testDates.html @@ -282,5 +282,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testEmptyAltFrontMatter.html b/packages/cli/test/functional/test_site/expected/testEmptyAltFrontMatter.html index 32c839fbf9..5598b3f90d 100644 --- a/packages/cli/test/functional/test_site/expected/testEmptyAltFrontMatter.html +++ b/packages/cli/test/functional/test_site/expected/testEmptyAltFrontMatter.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testEmptyFrontmatter.html b/packages/cli/test/functional/test_site/expected/testEmptyFrontmatter.html index fd8c60d424..d213f2f53e 100644 --- a/packages/cli/test/functional/test_site/expected/testEmptyFrontmatter.html +++ b/packages/cli/test/functional/test_site/expected/testEmptyFrontmatter.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testExternalScripts.html b/packages/cli/test/functional/test_site/expected/testExternalScripts.html index 987a8a8675..eeb9db0ab1 100644 --- a/packages/cli/test/functional/test_site/expected/testExternalScripts.html +++ b/packages/cli/test/functional/test_site/expected/testExternalScripts.html @@ -287,5 +287,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testFontAwesomeInPage.html b/packages/cli/test/functional/test_site/expected/testFontAwesomeInPage.html index 659abc4857..f0d9795e39 100644 --- a/packages/cli/test/functional/test_site/expected/testFontAwesomeInPage.html +++ b/packages/cli/test/functional/test_site/expected/testFontAwesomeInPage.html @@ -120,5 +120,17 @@ }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testGlyphiconInPage.html b/packages/cli/test/functional/test_site/expected/testGlyphiconInPage.html index b7dfed599f..9b3f83bba8 100644 --- a/packages/cli/test/functional/test_site/expected/testGlyphiconInPage.html +++ b/packages/cli/test/functional/test_site/expected/testGlyphiconInPage.html @@ -117,5 +117,17 @@ }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testHr.html b/packages/cli/test/functional/test_site/expected/testHr.html index f477a99c48..8b28e92f4d 100644 --- a/packages/cli/test/functional/test_site/expected/testHr.html +++ b/packages/cli/test/functional/test_site/expected/testHr.html @@ -285,5 +285,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testIconsInSiteLayout.html b/packages/cli/test/functional/test_site/expected/testIconsInSiteLayout.html index 46c2949e5f..c64e15a44b 100644 --- a/packages/cli/test/functional/test_site/expected/testIconsInSiteLayout.html +++ b/packages/cli/test/functional/test_site/expected/testIconsInSiteLayout.html @@ -119,5 +119,17 @@ }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testImages.html b/packages/cli/test/functional/test_site/expected/testImages.html index 82030358b8..63a938b01c 100644 --- a/packages/cli/test/functional/test_site/expected/testImages.html +++ b/packages/cli/test/functional/test_site/expected/testImages.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testIncludeBoilerplate.html b/packages/cli/test/functional/test_site/expected/testIncludeBoilerplate.html index 6a03165efa..f90cd241bd 100644 --- a/packages/cli/test/functional/test_site/expected/testIncludeBoilerplate.html +++ b/packages/cli/test/functional/test_site/expected/testIncludeBoilerplate.html @@ -367,5 +367,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testIncludeMultipleModals.html b/packages/cli/test/functional/test_site/expected/testIncludeMultipleModals.html index 01c2f798d8..e4aba3e483 100644 --- a/packages/cli/test/functional/test_site/expected/testIncludeMultipleModals.html +++ b/packages/cli/test/functional/test_site/expected/testIncludeMultipleModals.html @@ -282,5 +282,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testIncludePluginsRendered.html b/packages/cli/test/functional/test_site/expected/testIncludePluginsRendered.html index e0ab4eb839..ded11bcc2d 100644 --- a/packages/cli/test/functional/test_site/expected/testIncludePluginsRendered.html +++ b/packages/cli/test/functional/test_site/expected/testIncludePluginsRendered.html @@ -277,5 +277,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testLayouts.html b/packages/cli/test/functional/test_site/expected/testLayouts.html index cf8feb8d68..6d437f4653 100644 --- a/packages/cli/test/functional/test_site/expected/testLayouts.html +++ b/packages/cli/test/functional/test_site/expected/testLayouts.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testLayoutsOverride.html b/packages/cli/test/functional/test_site/expected/testLayoutsOverride.html index 00545cce33..6aec3e0031 100644 --- a/packages/cli/test/functional/test_site/expected/testLayoutsOverride.html +++ b/packages/cli/test/functional/test_site/expected/testLayoutsOverride.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testLayoutsOverrideWithAltFrontmatter.html b/packages/cli/test/functional/test_site/expected/testLayoutsOverrideWithAltFrontmatter.html index 70dcfca773..01da27a4d5 100644 --- a/packages/cli/test/functional/test_site/expected/testLayoutsOverrideWithAltFrontmatter.html +++ b/packages/cli/test/functional/test_site/expected/testLayoutsOverrideWithAltFrontmatter.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testLayoutsWithAltFrontMatter.html b/packages/cli/test/functional/test_site/expected/testLayoutsWithAltFrontMatter.html index 578fc81c8e..713fdb9df8 100644 --- a/packages/cli/test/functional/test_site/expected/testLayoutsWithAltFrontMatter.html +++ b/packages/cli/test/functional/test_site/expected/testLayoutsWithAltFrontMatter.html @@ -283,5 +283,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testLinks.html b/packages/cli/test/functional/test_site/expected/testLinks.html index 34576fda88..32f82dd4ef 100644 --- a/packages/cli/test/functional/test_site/expected/testLinks.html +++ b/packages/cli/test/functional/test_site/expected/testLinks.html @@ -286,5 +286,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testList.html b/packages/cli/test/functional/test_site/expected/testList.html index 58c3cc3470..46bd96e9c4 100644 --- a/packages/cli/test/functional/test_site/expected/testList.html +++ b/packages/cli/test/functional/test_site/expected/testList.html @@ -699,5 +699,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testMaterialIconsInPage.html b/packages/cli/test/functional/test_site/expected/testMaterialIconsInPage.html index 9c2dc6b8a5..388d1b0121 100644 --- a/packages/cli/test/functional/test_site/expected/testMaterialIconsInPage.html +++ b/packages/cli/test/functional/test_site/expected/testMaterialIconsInPage.html @@ -115,5 +115,17 @@ }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testMath.html b/packages/cli/test/functional/test_site/expected/testMath.html index 19e743fa01..d721678672 100644 --- a/packages/cli/test/functional/test_site/expected/testMath.html +++ b/packages/cli/test/functional/test_site/expected/testMath.html @@ -542,5 +542,17 @@

Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testMermaid.html b/packages/cli/test/functional/test_site/expected/testMermaid.html new file mode 100644 index 0000000000..d682b0c47f --- /dev/null +++ b/packages/cli/test/functional/test_site/expected/testMermaid.html @@ -0,0 +1,352 @@ + + + + + + + + + + + + + Rendering of diagrams via mermaid-js + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
  • Open Bugs
  • +
    +
    +
    + Test Jumbotron
    +
    +
    +
    +

    Relative Link Test This is a relative Intra-Site link in a layout (see link)

    +
    +
    + + + + +
    + +

    Mermaid Test

    +
    + %%{init: { "theme": "neutral" } }%% + + graph TD; + A-->B; + A-->C; + B-->D; + C-->D; +
    +
    + graph TD; + A-->B; + A-->C; + B-->D; + C-->D; +
    +
    + sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts
    prevail! + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! +
    +
    + gantt + dateFormat YYYY-MM-DD + title Adding GANTT diagram to mermaid + section A section + Completed task :done, des1, 2014-01-06,2014-01-08 + Active task :active, des2, 2014-01-09, 3d + Future task : des3, after des2, 5d + Future task2 : des4, after des3, 5d + + section Critical tasks + Completed task in the critical line :crit, done, 2014-01-06,24h + Implement parser and jison :crit, done, after des1, 2d + Create tests for parser :crit, active, 3d + Future task in critical line :crit, 5d + Create tests for renderer :2d + Add to mermaid :1d + + section Documentation + Describe gantt syntax :active, a1, after des1, 3d + Add gantt diagram to demo page :after a1 , 20h + Add another diagram to demo page :doc1, after a1 , 48h + + section Last section + Describe gantt syntax :after doc1, 3d + Add gantt diagram to demo page : 20h + Add another diagram to demo page : 48h +
    +
    + pie title Pets adopted by volunteers + "Dogs" : 386 + "Cats" : 85 + "Rats" : 15 +
    +
    + + + + +
    +
    +
    +

    Heading in footer should not be indexed

    +
    + This is a dynamic height footer that supports markdown 😄! +
    +
    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testMermaid.page-vue-render.js b/packages/cli/test/functional/test_site/expected/testMermaid.page-vue-render.js new file mode 100644 index 0000000000..359953423d --- /dev/null +++ b/packages/cli/test/functional/test_site/expected/testMermaid.page-vue-render.js @@ -0,0 +1,19 @@ + + var pageVueRenderFn = function anonymous( +) { +with(this){return _c('div',{attrs:{"id":"app"}},[_c('div',[_c('header',[_c('navbar',{attrs:{"type":"dark","default-highlight-on":"sibling-or-child"},scopedSlots:_u([{key:"brand",fn:function(){return [_c('a',{staticClass:"navbar-brand",attrs:{"href":"/","title":"Home"}},[_v("MarkBind Test Site")])]},proxy:true}])},[_v(" "),_c('li',[_c('a',{staticClass:"nav-link",attrs:{"href":"/test_site/bugs/index.html"}},[_v("Open Bugs")])])]),_v(" "),_m(0)],1),_v(" "),_m(1)]),_v(" "),_c('div',{attrs:{"id":"flex-body"}},[_c('overlay-source',{attrs:{"id":"site-nav","tag-name":"nav","to":"site-nav"}},[_c('div',{staticClass:"site-nav-top"},[_c('div',{staticClass:"fw-bold mb-2",staticStyle:{"font-size":"1.25rem"}},[_c('div',[_c('h2',{attrs:{"id":"default-layout"}},[_v("Default Layout"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#default-layout","onclick":"event.stopPropagation()"}})])])])]),_v(" "),_c('div',{staticClass:"nav-component slim-scroll"},[_c('div',[_c('site-nav',[_c('overlay-source',{staticClass:"site-nav-list site-nav-list-root",attrs:{"tag-name":"ul","to":"mb-site-nav"}},[_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"/test_site/index.html"}},[_v("Home 🏠")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"/test_site/bugs/index.html"}},[_v("Open Bugs 🐛")])])]),_v(" "),_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-0"},[_c('h3',{attrs:{"id":"testing-site-nav"}},[_v("Testing Site-Nav"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#testing-site-nav","onclick":"event.stopPropagation()"}})])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('strong',[_v("Dropdown ")]),_v(" "),_c('span',{staticClass:"glyphicon glyphicon-search",attrs:{"aria-hidden":"true"}}),_v(" title ✏️ "),_v(" "),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon site-nav-rotate-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-dropdown-container-open site-nav-list"},[_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_v("Dropdown link one")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_v("Html within site-nav "),_c('span',{staticStyle:{"color":"red"}},[_v("should")]),_v(" be displayed properly")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Nested Dropdown title 📐\n\n"),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-2",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_c('strong',[_v("Nested")]),_v(" Dropdown link one")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-2",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_c('strong',[_v("Nested")]),_v(" Dropdown link two")])])])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_v("Dropdown link two")])])])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_c('mark',[_v("Third Link")]),_v(" 📋")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Filler text "),_c('a',{attrs:{"href":"https://www.youtube.com/"}},[_c('span',{staticClass:"glyphicon glyphicon-facetime-video",attrs:{"aria-hidden":"true"}}),_v(" Youtube 📺")]),_v(" filler text"),_v(" "),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}},[_v("The answer to everything in the universe")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('mark',[_v("Dropdown title")]),_v(" "),_c('span',{staticClass:"glyphicon glyphicon-comment",attrs:{"aria-hidden":"true"}}),_v(" ✏️ "),_v(" "),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon site-nav-rotate-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-dropdown-container-open site-nav-list"},[_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-2",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"https://www.google.com/"}},[_c('strong',[_v("Nested")]),_v(" Dropdown link one")])])])])])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Really Long Dropdown Title Really Long Dropdown Title Really Long Dropdown Title Really Long Dropdown\n\n"),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-1"},[_v("Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text Really Really Long Text")]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Nested Dropdown Title\n\n"),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-2"},[_v("Hello Doge Hello Doge 🐶")]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-2",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"/test_site/index.html"}},[_c('strong',[_v("NESTED LINK")]),_v(" Home 🏠")])])]),_v(" "),_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-2"},[_v("Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit Text cut off from height limit")])])])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-0",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Test line break in navigation layout\n\n"),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-1"},[_v("Nested line break text ✂️")]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_c('a',{attrs:{"href":"/test_site/index.html"}},[_v("Nested line break href")]),_v(" "),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-2"},[_v("Nested Nested line break text ✂️")])])]),_v(" "),_c('li',[_c('div',{staticClass:"site-nav-default-list-item site-nav-list-item-1",attrs:{"onclick":"handleSiteNavClick(this)"}},[_v("Nested line break dropdown menu\n\n"),_c('div',{staticClass:"site-nav-dropdown-btn-container"},[_c('i',{staticClass:"site-nav-dropdown-btn-icon",attrs:{"onclick":"handleSiteNavClick(this.parentNode.parentNode, false); event.stopPropagation();"}},[_c('span',{staticClass:"glyphicon glyphicon-menu-down",attrs:{"aria-hidden":"true"}})])])]),_c('ul',{staticClass:"site-nav-dropdown-container site-nav-list"},[_c('li',{staticClass:"site-nav-custom-list-item site-nav-list-item-2"},[_v("Line break item 2 📘")])])])])])])],1)],1)])]),_v(" "),_c('div',{attrs:{"id":"content-wrapper"}},[_c('breadcrumb'),_v(" "),_m(2),_v(" "),_c('div',{directives:[{name:"mermaid",rawName:"v-mermaid"}],staticClass:"mermaid"},[_v("\n%%{init: { \"theme\": \"neutral\" } }%%\n\ngraph TD;\nA-->B;\nA-->C;\nB-->D;\nC-->D;\n")]),_v(" "),_c('div',{directives:[{name:"mermaid",rawName:"v-mermaid"}],staticClass:"mermaid"},[_v("\ngraph TD;\n A-->B;\n A-->C;\n B-->D;\n C-->D;\n")]),_v(" "),_c('div',{directives:[{name:"mermaid",rawName:"v-mermaid"}],staticClass:"mermaid"},[_v("\nsequenceDiagram\n participant Alice\n participant Bob\n Alice->>John: Hello John, how are you?\n loop Healthcheck\n John->>John: Fight against hypochondria\n end\n Note right of John: Rational thoughts "),_c('br'),_v("prevail!\n John-->>Alice: Great!\n John->>Bob: How about you?\n Bob-->>John: Jolly good!\n")]),_v(" "),_c('div',{directives:[{name:"mermaid",rawName:"v-mermaid"}],staticClass:"mermaid"},[_v("\ngantt\ndateFormat YYYY-MM-DD\ntitle Adding GANTT diagram to mermaid\nsection A section\nCompleted task :done, des1, 2014-01-06,2014-01-08\nActive task :active, des2, 2014-01-09, 3d\nFuture task : des3, after des2, 5d\nFuture task2 : des4, after des3, 5d\n\nsection Critical tasks\nCompleted task in the critical line :crit, done, 2014-01-06,24h\nImplement parser and jison :crit, done, after des1, 2d\nCreate tests for parser :crit, active, 3d\nFuture task in critical line :crit, 5d\nCreate tests for renderer :2d\nAdd to mermaid :1d\n\nsection Documentation\nDescribe gantt syntax :active, a1, after des1, 3d\nAdd gantt diagram to demo page :after a1 , 20h\nAdd another diagram to demo page :doc1, after a1 , 48h\n\nsection Last section\nDescribe gantt syntax :after doc1, 3d\nAdd gantt diagram to demo page : 20h\nAdd another diagram to demo page : 48h\n")]),_v(" "),_c('div',{directives:[{name:"mermaid",rawName:"v-mermaid"}],staticClass:"mermaid"},[_v("\npie title Pets adopted by volunteers\n \"Dogs\" : 386\n \"Cats\" : 85\n \"Rats\" : 15\n")])],1),_v(" "),_c('overlay-source',{attrs:{"id":"page-nav","tag-name":"nav","to":"page-nav"}},[_c('div',{staticClass:"nav-component slim-scroll"})]),_v(" "),_c('scroll-top-button')],1),_v(" "),_m(3)])} +}; + var pageVueStaticRenderFns = [function anonymous( +) { +with(this){return _c('div',{staticClass:"bg-info display-4 text-center text-white"},[_c('br'),_v("\n Test Jumbotron"),_c('br'),_v(" "),_c('br')])} +},function anonymous( +) { +with(this){return _c('p',[_c('strong',[_v("Relative Link Test")]),_v(" This is a relative Intra-Site link in a layout (see "),_c('a',{attrs:{"href":"/test_site/index.html#heading-with-hidden-keyword"}},[_v("link")]),_v(")")])} +},function anonymous( +) { +with(this){return _c('p',[_c('strong',[_v("Mermaid Test")])])} +},function anonymous( +) { +with(this){return _c('div',[_c('footer',[_c('h1',{attrs:{"id":"heading-in-footer-should-not-be-indexed"}},[_v("Heading in footer should not be indexed"),_c('a',{staticClass:"fa fa-anchor",attrs:{"href":"#heading-in-footer-should-not-be-indexed","onclick":"event.stopPropagation()"}})]),_v(" "),_c('div',{staticClass:"text-center"},[_v("\n This is a dynamic height footer that supports markdown "),_c('span',[_v("😄")]),_v("!\n ")])])])} +}]; + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testModals.html b/packages/cli/test/functional/test_site/expected/testModals.html index 2af69c5ea4..202aebcdf4 100644 --- a/packages/cli/test/functional/test_site/expected/testModals.html +++ b/packages/cli/test/functional/test_site/expected/testModals.html @@ -418,5 +418,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testNunjucksPathResolving.html b/packages/cli/test/functional/test_site/expected/testNunjucksPathResolving.html index 0476a7b136..72ff3dfea0 100644 --- a/packages/cli/test/functional/test_site/expected/testNunjucksPathResolving.html +++ b/packages/cli/test/functional/test_site/expected/testNunjucksPathResolving.html @@ -283,5 +283,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testOcticonInPage.html b/packages/cli/test/functional/test_site/expected/testOcticonInPage.html index 00b83de4db..f5efb368a6 100644 --- a/packages/cli/test/functional/test_site/expected/testOcticonInPage.html +++ b/packages/cli/test/functional/test_site/expected/testOcticonInPage.html @@ -128,5 +128,17 @@ }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPageNav.html b/packages/cli/test/functional/test_site/expected/testPageNav.html index cdb1f4fd30..329b4f4ffc 100644 --- a/packages/cli/test/functional/test_site/expected/testPageNav.html +++ b/packages/cli/test/functional/test_site/expected/testPageNav.html @@ -291,5 +291,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPageNavPrint.html b/packages/cli/test/functional/test_site/expected/testPageNavPrint.html index 5142d16ad5..911ee94358 100644 --- a/packages/cli/test/functional/test_site/expected/testPageNavPrint.html +++ b/packages/cli/test/functional/test_site/expected/testPageNavPrint.html @@ -289,5 +289,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPageNavTarget.html b/packages/cli/test/functional/test_site/expected/testPageNavTarget.html index bb24c7a4cb..9d7fcbac84 100644 --- a/packages/cli/test/functional/test_site/expected/testPageNavTarget.html +++ b/packages/cli/test/functional/test_site/expected/testPageNavTarget.html @@ -279,5 +279,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPageNavWithOnlyTitle.html b/packages/cli/test/functional/test_site/expected/testPageNavWithOnlyTitle.html index 2745f67e77..309e742fa0 100644 --- a/packages/cli/test/functional/test_site/expected/testPageNavWithOnlyTitle.html +++ b/packages/cli/test/functional/test_site/expected/testPageNavWithOnlyTitle.html @@ -279,5 +279,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPageNavWithoutTitleAndNavHeadings.html b/packages/cli/test/functional/test_site/expected/testPageNavWithoutTitleAndNavHeadings.html index 83d1cc25c0..3e9826ed8d 100644 --- a/packages/cli/test/functional/test_site/expected/testPageNavWithoutTitleAndNavHeadings.html +++ b/packages/cli/test/functional/test_site/expected/testPageNavWithoutTitleAndNavHeadings.html @@ -275,5 +275,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPanelMarkdownParsing.html b/packages/cli/test/functional/test_site/expected/testPanelMarkdownParsing.html index e06287b5e9..59141de693 100644 --- a/packages/cli/test/functional/test_site/expected/testPanelMarkdownParsing.html +++ b/packages/cli/test/functional/test_site/expected/testPanelMarkdownParsing.html @@ -333,5 +333,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPanels.html b/packages/cli/test/functional/test_site/expected/testPanels.html index 225f7a9757..4e6f9d512f 100644 --- a/packages/cli/test/functional/test_site/expected/testPanels.html +++ b/packages/cli/test/functional/test_site/expected/testPanels.html @@ -291,5 +291,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPanelsClosingTransition.html b/packages/cli/test/functional/test_site/expected/testPanelsClosingTransition.html index 1cea9e5c8a..781215f04d 100644 --- a/packages/cli/test/functional/test_site/expected/testPanelsClosingTransition.html +++ b/packages/cli/test/functional/test_site/expected/testPanelsClosingTransition.html @@ -319,5 +319,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPlantUML.html b/packages/cli/test/functional/test_site/expected/testPlantUML.html index e048a41e44..1c5e7ec3f9 100644 --- a/packages/cli/test/functional/test_site/expected/testPlantUML.html +++ b/packages/cli/test/functional/test_site/expected/testPlantUML.html @@ -281,5 +281,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPopoverTrigger.html b/packages/cli/test/functional/test_site/expected/testPopoverTrigger.html index 265d901104..e42af9b13a 100644 --- a/packages/cli/test/functional/test_site/expected/testPopoverTrigger.html +++ b/packages/cli/test/functional/test_site/expected/testPopoverTrigger.html @@ -281,5 +281,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testPopovers.html b/packages/cli/test/functional/test_site/expected/testPopovers.html index 7add324f63..ef6fd929b5 100644 --- a/packages/cli/test/functional/test_site/expected/testPopovers.html +++ b/packages/cli/test/functional/test_site/expected/testPopovers.html @@ -366,5 +366,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testSingleAltFrontMatter.html b/packages/cli/test/functional/test_site/expected/testSingleAltFrontMatter.html index 630f086a2d..6c7f2300ee 100644 --- a/packages/cli/test/functional/test_site/expected/testSingleAltFrontMatter.html +++ b/packages/cli/test/functional/test_site/expected/testSingleAltFrontMatter.html @@ -274,5 +274,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testSourceContainScript.html b/packages/cli/test/functional/test_site/expected/testSourceContainScript.html index ea8eb34df3..9779cfd24a 100644 --- a/packages/cli/test/functional/test_site/expected/testSourceContainScript.html +++ b/packages/cli/test/functional/test_site/expected/testSourceContainScript.html @@ -285,5 +285,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testThumbnails.html b/packages/cli/test/functional/test_site/expected/testThumbnails.html index 4535319263..10dc085fb4 100644 --- a/packages/cli/test/functional/test_site/expected/testThumbnails.html +++ b/packages/cli/test/functional/test_site/expected/testThumbnails.html @@ -373,5 +373,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testTooltipSpacing.html b/packages/cli/test/functional/test_site/expected/testTooltipSpacing.html index ca27a9bcd8..91fb8048e8 100644 --- a/packages/cli/test/functional/test_site/expected/testTooltipSpacing.html +++ b/packages/cli/test/functional/test_site/expected/testTooltipSpacing.html @@ -283,5 +283,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testTree.html b/packages/cli/test/functional/test_site/expected/testTree.html index 4c4f33ccc9..c01c330240 100644 --- a/packages/cli/test/functional/test_site/expected/testTree.html +++ b/packages/cli/test/functional/test_site/expected/testTree.html @@ -348,5 +348,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testVariableContainsInclude.html b/packages/cli/test/functional/test_site/expected/testVariableContainsInclude.html index 3a509cb17b..3aa654fa26 100644 --- a/packages/cli/test/functional/test_site/expected/testVariableContainsInclude.html +++ b/packages/cli/test/functional/test_site/expected/testVariableContainsInclude.html @@ -273,5 +273,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/testWeb3FormPlugin.html b/packages/cli/test/functional/test_site/expected/testWeb3FormPlugin.html index d814f49596..9ad7a08c41 100644 --- a/packages/cli/test/functional/test_site/expected/testWeb3FormPlugin.html +++ b/packages/cli/test/functional/test_site/expected/testWeb3FormPlugin.html @@ -327,5 +327,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/expected/test_md_fragment.html b/packages/cli/test/functional/test_site/expected/test_md_fragment.html index 57f0360600..caf13bf795 100644 --- a/packages/cli/test/functional/test_site/expected/test_md_fragment.html +++ b/packages/cli/test/functional/test_site/expected/test_md_fragment.html @@ -273,5 +273,17 @@

    Heading in footer should not be }) } + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/site.json b/packages/cli/test/functional/test_site/site.json index bde8c35414..8ba49252e0 100644 --- a/packages/cli/test/functional/test_site/site.json +++ b/packages/cli/test/functional/test_site/site.json @@ -197,6 +197,10 @@ { "src": "testSourceContainScript.md", "title": "Test: If source contains script or css, when included, the script or css should be included" + }, + { + "src": "testMermaid.md", + "title": "Rendering of diagrams via mermaid-js" } ], "pagesExclude": ["**/*-fragment.md"], @@ -223,7 +227,8 @@ "filterTags", "googleAnalytics", "mathDelimiters", - "web3Form" + "web3Form", + "mermaid" ], "pluginsContext": { "testMarkbindPlugin": { diff --git a/packages/cli/test/functional/test_site/testMermaid.md b/packages/cli/test/functional/test_site/testMermaid.md new file mode 100644 index 0000000000..2dd8dc4004 --- /dev/null +++ b/packages/cli/test/functional/test_site/testMermaid.md @@ -0,0 +1,69 @@ +**Mermaid Test** + + +%%{init: { "theme": "neutral" } }%% + +graph TD; +A-->B; +A-->C; +B-->D; +C-->D; + + + +graph TD; + A-->B; + A-->C; + B-->D; + C-->D; + + + +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts
    prevail! + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! +
    + + +gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram to mermaid +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d + +section Critical tasks +Completed task in the critical line :crit, done, 2014-01-06,24h +Implement parser and jison :crit, done, after des1, 2d +Create tests for parser :crit, active, 3d +Future task in critical line :crit, 5d +Create tests for renderer :2d +Add to mermaid :1d + +section Documentation +Describe gantt syntax :active, a1, after des1, 3d +Add gantt diagram to demo page :after a1 , 20h +Add another diagram to demo page :doc1, after a1 , 48h + +section Last section +Describe gantt syntax :after doc1, 3d +Add gantt diagram to demo page : 20h +Add another diagram to demo page : 48h + + + +pie title Pets adopted by volunteers + "Dogs" : 386 + "Cats" : 85 + "Rats" : 15 + diff --git a/packages/cli/test/functional/test_site_templates/test_project/expected/diagrams/example.png b/packages/cli/test/functional/test_site_templates/test_project/expected/diagrams/example.png index 2adfadb33a0309daeff6803da6869da96b636451..0fa4897e7477a41b92e326bb28fae302325dd535 100644 GIT binary patch literal 10649 zcmbt)cQ{<#_pcCy=thecL>EMYktjiwB%(wR(R+(BNOU6l=pjn<5)wUn?<0Z`B!(Eq zj2>-7H;j8m@_xVX@45GR?(^I`|I9gOueJ7G?X%Y2=R|31s!@_(AtxXppuDes?=kSd zPe5?N=@KDu<$N|@Pe34Oe*d206K~UvEHZz#AL(gs%CJyqgl z_iZC6hirRD`m4yQhlatS=b6En--2eLqFyVG6Zj#Pu(? z%Z*&t+T-;fmTzWPwk*8Fmg;-Gc%j!(@@wl1I|n~)E8Z6lI1BXE`=Qs?twi(AmROS} zwEilLELIsxehU5ETy`Ax9H!{n*3$C3Hu*No%=AcXa#E;ugb!8uPizTW;UWu{nbSeYmc%g;h zJcv3(X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T+VBe58iE_|rIQIi}m{Y1|7C zE6O@MUQM-|^WIZs-Ad{6S#c~y9_tfbzsY%j3#Om=@$SvFO=!eFbf#z8o9pv2G41+& zv+)7@oY;H|7aL!2m}w?F@CG@Fce~&AQZB_>r&4*X?atHkHkLDkRf8k&s}UG7+TdZm z9}j{?HyOON51i$Iwk&R9kM45_+{1sl*ZOPjLVRpfoQn{95ycxu>6AJ+-S-^|@adG| zTL-6}YKbxu=0UY+lhs6)>?kHW|F4fW_~`m#B9NJ9KfiPVH^B6hbLuSSeN`QUloP95B)U_ph&lu9PSFc097%XCF~ zp1Xli9Bf2bKI4TG0k`B7s#<`IM&26^pOkav4!Af_8ADCmR*TZON+vLntwlSVJWqP? zjsRRt|Mtv(07y0#)5?;MGa`Y;xcL2SJ<~2HswPOVuhq$(6Ndz`^oZcz?^W+>4mg-M zeyQ>Ar4Sy-!UUn3>c*MWBDDk+j&0 z_Csk{|GG3OOC;5QcB`U%{~b-n~>*+lNZw=x3~{5-7C z$xT^@x(l9Z)hbkG7Uzazp|*s)9le$ig-%~0Os8SL+2(A{yU(@Z{&JoV`Prket`pk> zc3R&IxKayR(sy*vUG!BIU?c<#Xeo85hq=+Uv|n5kA}`l%U-yF-A^m4jw!Hxpr1&Vf zAs3HepHLn7Gg%cDRIhjkp!xIRft-*>6=J$E9W6^Xl{fx$$DEm{9r z`)bvfWYlNi`xb~3q3PBWV`L)OzcwrDrWJ_-P&6m&UjLqUZYHokdD&Aw;f!FUQqQ!@ zB+~Azt&M)%w;M?eff+r29=<{) Date: Mon, 1 Apr 2024 13:04:48 +0800 Subject: [PATCH 06/30] Add documentation --- docs/site.json | 3 +- docs/userGuide/plugins/mermaid.md | 96 +++++++++++++++++++++++++++++++ docs/userGuide/syntax/diagrams.md | 5 ++ docs/userGuide/usingPlugins.md | 1 + 4 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 docs/userGuide/plugins/mermaid.md diff --git a/docs/site.json b/docs/site.json index 639a4bfc1c..72237db985 100644 --- a/docs/site.json +++ b/docs/site.json @@ -25,7 +25,8 @@ "mathDelimiters", "codeBlockWrapButtons", "web3Form", - "codeBlockCopyButtons" + "codeBlockCopyButtons", + "mermaid" ], "pluginsContext" : { "filterTags" : { diff --git a/docs/userGuide/plugins/mermaid.md b/docs/userGuide/plugins/mermaid.md new file mode 100644 index 0000000000..aed184255c --- /dev/null +++ b/docs/userGuide/plugins/mermaid.md @@ -0,0 +1,96 @@ +### Plugin: Mermaid + +This plugin allows you to utilize Mermaid by automatically importing the library and initializing the rendering of the diagrams. + +> Mermaid is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. + + + +All supported diagrams and detailed configurations are available in [the mermaid official documentation](https://mermaid-js.github.io/mermaid/). + + + +To enable this plugin, add `mermaid` to your site's plugins. Optionally, you can specify an alternative URL (e.g., to use another CDN or another version) in the plugin context. + +```js {heading="site.json"} +{ + ... + "plugins": [ + "mermaid" + ], + "pluginsContext": { + "mermaid": { + "address": "https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs" // replace with URL of your choice + } + } +} +``` + +If no `address` is specified in the plugin context, the default CDN address (`https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs`) will be used. + +To create a Mermaid diagram, use the `` tag and provide the diagram definition within the tag. + +{{ icon_example }} Pie Chart: + + +html + + +pie title Pets adopted by volunteers + "Dogs" : 386 + "Cats" : 85 + "Rats" : 15 + + + + +{{ icon_example }} Flowchart: + + +html + + +flowchart TD + A[Start] --> B{Is it?} + B -->|Yes| C[OK] + C --> D[Rethink] + D --> B + B ---->|No| E[End] + + + + +{{ icon_example }} User Journey Diagram: + + +html + + +journey + title My working day + section Go to work + Make tea: 5: Me + Go upstairs: 3: Me + Do work: 1: Me, Cat + + + + +{{ icon_example }} Gitgraph Diagram: + + +html + + +gitGraph + commit + branch develop + checkout develop + commit + checkout main + merge develop + + + + +The plugin automatically converts the `` tags into appropriate `
    ` elements with the necessary classes and attributes for rendering the diagrams using the Mermaid library. diff --git a/docs/userGuide/syntax/diagrams.md b/docs/userGuide/syntax/diagrams.md index 92d2c026d9..1e67592842 100644 --- a/docs/userGuide/syntax/diagrams.md +++ b/docs/userGuide/syntax/diagrams.md @@ -142,6 +142,11 @@ name | `string` | The name of the output file.
    Avoid using the same name fo src | `string` | The URL of the diagram if your diagram is in another `.puml` file.
    The URL can be specified as absolute or relative references. More info in: _[Intra-Site Links]({{baseUrl}}/userGuide/formattingContents.html#intraSiteLinks)_ width | `string` | The width of the diagram in pixels.
    If both width and height are specified, width takes priority over height. It is to maintain the diagram's aspect ratio. + + +It's also possible to utilize JavaScript diagram libraries such as [Mermaid](https://mermaid-js.github.io/mermaid/) via the [Mermaid plugin](../usingPlugins.html#plugin-mermaid). + +
    ``` diff --git a/docs/userGuide/usingPlugins.md b/docs/userGuide/usingPlugins.md index 2377269354..a41b30c229 100644 --- a/docs/userGuide/usingPlugins.md +++ b/docs/userGuide/usingPlugins.md @@ -64,6 +64,7 @@ MarkBind has a set of built-in plugins that can be used immediately without inst + ## Using External Plugins From 1f9a752e96db70de1bb3a239b366fce1c2cfb243 Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 1 Apr 2024 13:09:16 +0800 Subject: [PATCH 07/30] Enhance functional test with inside panel option --- packages/cli/test/functional/test_site/testMermaid.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cli/test/functional/test_site/testMermaid.md b/packages/cli/test/functional/test_site/testMermaid.md index 2dd8dc4004..2838a1a8ea 100644 --- a/packages/cli/test/functional/test_site/testMermaid.md +++ b/packages/cli/test/functional/test_site/testMermaid.md @@ -61,9 +61,11 @@ Add gantt diagram to demo page : 20h Add another diagram to demo page : 48h + pie title Pets adopted by volunteers "Dogs" : 386 "Cats" : 85 "Rats" : 15 + From 6358354b6a1a75a4afab85dad9003ea997d99cae Mon Sep 17 00:00:00 2001 From: Tim-Siu Date: Mon, 1 Apr 2024 13:11:35 +0800 Subject: [PATCH 08/30] Update test expected --- .../test_site/expected/testMermaid.html | 16 ++++++++++------ .../expected/testMermaid.page-vue-render.js | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/cli/test/functional/test_site/expected/testMermaid.html b/packages/cli/test/functional/test_site/expected/testMermaid.html index d682b0c47f..51a75a9589 100644 --- a/packages/cli/test/functional/test_site/expected/testMermaid.html +++ b/packages/cli/test/functional/test_site/expected/testMermaid.html @@ -264,12 +264,16 @@

    Testing Site-Nav - pie title Pets adopted by volunteers - "Dogs" : 386 - "Cats" : 85 - "Rats" : 15 -

    + +
    + pie title Pets adopted by volunteers + "Dogs" : 386 + "Cats" : 85 + "Rats" : 15 +
    +