From 459f5a58a3e3c094c4020415beb772210cf22194 Mon Sep 17 00:00:00 2001 From: Steph <35910788+huynhicode@users.noreply.github.com> Date: Wed, 4 Oct 2023 00:32:30 -0700 Subject: [PATCH 1/7] Docs: Add Product Hunt info (#4900) * update card and announcements page * update integrations link and add product hunt badge * Revert navbar link change --------- Co-authored-by: Sidharth Vinod --- docs/ecosystem/mermaid-chart.md | 4 ++++ docs/news/announcements.md | 16 +++++++++++++--- .../mermaid/src/docs/ecosystem/mermaid-chart.md | 4 ++++ packages/mermaid/src/docs/index.md | 7 ++++--- packages/mermaid/src/docs/news/announcements.md | 16 +++++++++++++--- 5 files changed, 38 insertions(+), 9 deletions(-) diff --git a/docs/ecosystem/mermaid-chart.md b/docs/ecosystem/mermaid-chart.md index 5a0fdc18d..28c17e9d3 100644 --- a/docs/ecosystem/mermaid-chart.md +++ b/docs/ecosystem/mermaid-chart.md @@ -6,6 +6,10 @@ # Mermaid Chart +
+ +Mermaid Chart - A smarter way to create diagrams | Product Hunt + ## About [Mermaid Chart](https://www.mermaidchart.com) was born out of the Mermaid open source project and was founded by Knut Sveidqvist together with Open Core Ventures. The lead developers from Mermaid have joined the company and there is a strong connection between the project we all love and Mermaid Chart. Mermaid Chart brings resources to the open source development of Mermaid and makes it possible to work with Mermaid professionally. diff --git a/docs/news/announcements.md b/docs/news/announcements.md index 19568afa4..98ca64421 100644 --- a/docs/news/announcements.md +++ b/docs/news/announcements.md @@ -6,8 +6,18 @@ # Announcements -## [How to Make a Git Graph with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-git-graph-with-mermaid-chart/) +
-22 September 2023 · 7 mins +Mermaid Chart - A smarter way to create diagrams | Product Hunt -A git graph is one of the more useful forms of diagrams for developers and DevOps professionals. +## Calling all fans of Mermaid and Mermaid Chart! 🎉 + +We’ve officially made our Product Hunt debut, and would love any and all support from the community! + +[Click here](https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart) to check out our Product Hunt launch. + +Feel free to drop us a comment and let us know what you think. All new sign ups will receive a 30-day free trial of our Pro subscription, plus 25% off your first year. + +We’re on a mission to make text-based diagramming fun again. And we need your help to make that happen. + +Your support means the world to us. Thank you for being part of the diagramming movement. diff --git a/packages/mermaid/src/docs/ecosystem/mermaid-chart.md b/packages/mermaid/src/docs/ecosystem/mermaid-chart.md index 7312299b4..7d0e90024 100644 --- a/packages/mermaid/src/docs/ecosystem/mermaid-chart.md +++ b/packages/mermaid/src/docs/ecosystem/mermaid-chart.md @@ -4,6 +4,10 @@ outline: 'deep' # shows all h3 headings in outline in Vitepress # Mermaid Chart +
+ +Mermaid Chart - A smarter way to create diagrams | Product Hunt + ## About [Mermaid Chart](https://www.mermaidchart.com) was born out of the Mermaid open source project and was founded by Knut Sveidqvist together with Open Core Ventures. The lead developers from Mermaid have joined the company and there is a strong connection between the project we all love and Mermaid Chart. Mermaid Chart brings resources to the open source development of Mermaid and makes it possible to work with Mermaid professionally. diff --git a/packages/mermaid/src/docs/index.md b/packages/mermaid/src/docs/index.md index 8e92edd11..378e9dfab 100644 --- a/packages/mermaid/src/docs/index.md +++ b/packages/mermaid/src/docs/index.md @@ -9,6 +9,7 @@ hero: name: Mermaid text: Diagramming and charting tool tagline: JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. + image: src: /mermaid-logo.svg alt: Mermaid @@ -30,7 +31,7 @@ features: - title: 🏆 Award winning! details: 2019 JavaScript Open Source Award winner for "The Most Exciting Use of Technology". link: https://osawards.com/javascript/2019 - - title: 🥰 Mermaid + Mermaid Chart - details: Mermaid Chart is a major supporter of the Mermaid project. - link: https://www.mermaidchart.com/ + - title: 🎉 We are on Product Hunt! + details: We would love any and all support from the Mermaid community! + link: https://www.producthunt.com/posts/mermaid-chart --- diff --git a/packages/mermaid/src/docs/news/announcements.md b/packages/mermaid/src/docs/news/announcements.md index 8a8d000a5..f14aab785 100644 --- a/packages/mermaid/src/docs/news/announcements.md +++ b/packages/mermaid/src/docs/news/announcements.md @@ -1,7 +1,17 @@ # Announcements -## [How to Make a Git Graph with Mermaid Chart](https://www.mermaidchart.com/blog/posts/how-to-make-a-git-graph-with-mermaid-chart/) +
-22 September 2023 · 7 mins +Mermaid Chart - A smarter way to create diagrams | Product Hunt -A git graph is one of the more useful forms of diagrams for developers and DevOps professionals. +## Calling all fans of Mermaid and Mermaid Chart! 🎉 + +We’ve officially made our Product Hunt debut, and would love any and all support from the community! + +[Click here](https://www.producthunt.com/posts/mermaid-chart?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-mermaid-chart) to check out our Product Hunt launch. + +Feel free to drop us a comment and let us know what you think. All new sign ups will receive a 30-day free trial of our Pro subscription, plus 25% off your first year. + +We’re on a mission to make text-based diagramming fun again. And we need your help to make that happen. + +Your support means the world to us. Thank you for being part of the diagramming movement. From d17c75222935fc26d60c6547ae2d8ea1db3fe5f5 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 4 Oct 2023 14:06:43 +0530 Subject: [PATCH 2/7] Add TopBar --- docs/ecosystem/integrations-community.md | 4 +++- .../src/docs/.vitepress/components/TopBar.vue | 19 +++++++++++++++++++ .../src/docs/.vitepress/theme/index.ts | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 packages/mermaid/src/docs/.vitepress/components/TopBar.vue diff --git a/docs/ecosystem/integrations-community.md b/docs/ecosystem/integrations-community.md index b03e5581c..bdfc7e441 100644 --- a/docs/ecosystem/integrations-community.md +++ b/docs/ecosystem/integrations-community.md @@ -4,7 +4,9 @@ > > ## Please edit the corresponding file in [/packages/mermaid/src/docs/ecosystem/integrations-community.md](../../packages/mermaid/src/docs/ecosystem/integrations-community.md). -# Integrations - community +# Integrations + +## Official integration: [Mermaid Chart](./mermaid-chart.md) We're excited about the growth of the Mermaid community, and the number of plugins and integrations that have been created with Mermaid. diff --git a/packages/mermaid/src/docs/.vitepress/components/TopBar.vue b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue new file mode 100644 index 000000000..6b0dcb44e --- /dev/null +++ b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue @@ -0,0 +1,19 @@ + diff --git a/packages/mermaid/src/docs/.vitepress/theme/index.ts b/packages/mermaid/src/docs/.vitepress/theme/index.ts index ba1ac9bdb..ae626558d 100644 --- a/packages/mermaid/src/docs/.vitepress/theme/index.ts +++ b/packages/mermaid/src/docs/.vitepress/theme/index.ts @@ -6,6 +6,9 @@ import Mermaid from './Mermaid.vue'; import Contributors from '../components/Contributors.vue'; // @ts-ignore import HomePage from '../components/HomePage.vue'; +// @ts-ignore +import TopBar from '../components/TopBar.vue'; + import { getRedirect } from './redirect.js'; import { h } from 'vue'; @@ -18,6 +21,7 @@ export default { ...DefaultTheme, Layout() { return h(Theme.Layout, null, { + 'home-hero-before': () => h(TopBar), 'home-features-after': () => h(HomePage), }); }, From cda7a615261f8dde84359bdb6992ce0d5addf38f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 4 Oct 2023 14:07:08 +0530 Subject: [PATCH 3/7] Add MC to integrations --- packages/mermaid/src/docs/ecosystem/integrations-community.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs/ecosystem/integrations-community.md b/packages/mermaid/src/docs/ecosystem/integrations-community.md index c26ea4373..cd4cffe9b 100644 --- a/packages/mermaid/src/docs/ecosystem/integrations-community.md +++ b/packages/mermaid/src/docs/ecosystem/integrations-community.md @@ -2,7 +2,9 @@ outline: 'deep' # shows all h3 headings in outline in Vitepress --- -# Integrations - community +# Integrations + +## Official integration: [Mermaid Chart](./mermaid-chart.md) We're excited about the growth of the Mermaid community, and the number of plugins and integrations that have been created with Mermaid. From a6bb1ea28ce6700bb149c674b1ea3a5b4368ff4d Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 4 Oct 2023 14:09:34 +0530 Subject: [PATCH 4/7] Fix TopBar --- .../src/docs/.vitepress/components/TopBar.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/mermaid/src/docs/.vitepress/components/TopBar.vue b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue index 6b0dcb44e..d0a202c58 100644 --- a/packages/mermaid/src/docs/.vitepress/components/TopBar.vue +++ b/packages/mermaid/src/docs/.vitepress/components/TopBar.vue @@ -1,19 +1,14 @@ From f49e8c5784d07c0eacc70d40c46c3e2156908bb2 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 4 Oct 2023 14:19:19 +0530 Subject: [PATCH 5/7] Fix release version --- packages/mermaid/package.json | 2 +- packages/mermaid/scripts/update-release-version.mts | 1 + packages/mermaid/src/docs/config/configuration.md | 2 +- packages/mermaid/src/docs/config/directives.md | 2 +- packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 5877cae7e..10bb67270 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -40,7 +40,7 @@ "types:verify-config": "ts-node-esm scripts/create-types-from-json-schema.mts --verify", "checkCircle": "npx madge --circular ./src", "release": "pnpm build", - "prepublishOnly": "cpy '../../README.*' ./ --cwd=. && pnpm -w run build" + "prepublishOnly": "cpy '../../README.*' ./ --cwd=. && pnpm docs:release-version && pnpm -w run build" }, "repository": { "type": "git", diff --git a/packages/mermaid/scripts/update-release-version.mts b/packages/mermaid/scripts/update-release-version.mts index 7f292f21b..abed18bc9 100644 --- a/packages/mermaid/scripts/update-release-version.mts +++ b/packages/mermaid/scripts/update-release-version.mts @@ -22,6 +22,7 @@ const main = async () => { const sourceDirGlob = posix.join('.', SOURCE_DOCS_DIR, '**'); const mdFileGlobs = getGlobs([posix.join(sourceDirGlob, '*.md')]); mdFileGlobs.push('!**/community/development.md'); + mdFileGlobs.push('!**/community/code.md'); const mdFiles = await getFilesFromGlobs(mdFileGlobs); mdFiles.sort(); const mdFilesWithPlaceholder: string[] = []; diff --git a/packages/mermaid/src/docs/config/configuration.md b/packages/mermaid/src/docs/config/configuration.md index e52f2c6d5..dcbdcf875 100644 --- a/packages/mermaid/src/docs/config/configuration.md +++ b/packages/mermaid/src/docs/config/configuration.md @@ -4,7 +4,7 @@ When mermaid starts, configuration is extracted to determine a configuration to - The default configuration - Overrides at the site level are set by the initialize call, and will be applied to all diagrams in the site/app. The term for this is the **siteConfig**. -- Frontmatter (v+) - diagram authors can update select configuration parameters in the frontmatter of the diagram. These are applied to the render config. +- Frontmatter (v10.5.0+) - diagram authors can update select configuration parameters in the frontmatter of the diagram. These are applied to the render config. - Directives (Deprecated by Frontmatter) - diagram authors can update select configuration parameters directly in the diagram code via directives. These are applied to the render config. **The render config** is configuration that is used when rendering by applying these configurations. diff --git a/packages/mermaid/src/docs/config/directives.md b/packages/mermaid/src/docs/config/directives.md index 7763eb073..0e211161c 100644 --- a/packages/mermaid/src/docs/config/directives.md +++ b/packages/mermaid/src/docs/config/directives.md @@ -1,7 +1,7 @@ # Directives ```warning -Directives are deprecated from v. Please use the `config` key in frontmatter to pass configuration. See [Configuration](./configuration.md) for more details. +Directives are deprecated from v10.5.0. Please use the `config` key in frontmatter to pass configuration. See [Configuration](./configuration.md) for more details. ``` ## Directives diff --git a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md index 82c6f1e48..1767e92d7 100644 --- a/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md +++ b/packages/mermaid/src/docs/syntax/entityRelationshipDiagram.md @@ -56,7 +56,7 @@ Mermaid syntax for ER diagrams is compatible with PlantUML, with an extension to Where: -- `first-entity` is the name of an entity. Names must begin with an alphabetic character or an underscore (from v+), and may also contain digits and hyphens. +- `first-entity` is the name of an entity. Names must begin with an alphabetic character or an underscore (from v10.5.0+), and may also contain digits and hyphens. - `relationship` describes the way that both entities inter-relate. See below. - `second-entity` is the name of the other entity. - `relationship-label` describes the relationship from the perspective of the first entity. @@ -144,7 +144,7 @@ erDiagram The `type` values must begin with an alphabetic character and may contain digits, hyphens, underscores, parentheses and square brackets. The `name` values follow a similar format to `type`, but may start with an asterisk as another option to indicate an attribute is a primary key. Other than that, there are no restrictions, and there is no implicit set of valid data types. -### Entity Name Aliases (v+) +### Entity Name Aliases (v10.5.0+) An alias can be added to an entity using square brackets. If provided, the alias will be showed in the diagram instead of the entity name. From 345d0d0bd2cb93ec823fe0fd6ee0f6caf1cd5256 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 4 Oct 2023 14:26:03 +0530 Subject: [PATCH 6/7] Fix lint issue --- packages/mermaid/scripts/update-release-version.mts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/mermaid/scripts/update-release-version.mts b/packages/mermaid/scripts/update-release-version.mts index abed18bc9..a5943b37b 100644 --- a/packages/mermaid/scripts/update-release-version.mts +++ b/packages/mermaid/scripts/update-release-version.mts @@ -21,8 +21,7 @@ const versionPlaceholder = ''; const main = async () => { const sourceDirGlob = posix.join('.', SOURCE_DOCS_DIR, '**'); const mdFileGlobs = getGlobs([posix.join(sourceDirGlob, '*.md')]); - mdFileGlobs.push('!**/community/development.md'); - mdFileGlobs.push('!**/community/code.md'); + mdFileGlobs.push('!**/community/development.md', '!**/community/code.md'); const mdFiles = await getFilesFromGlobs(mdFileGlobs); mdFiles.sort(); const mdFilesWithPlaceholder: string[] = []; From 22b783e31dc74d6288f3200b37eacf2cff6e1fb3 Mon Sep 17 00:00:00 2001 From: sidharthv96 Date: Wed, 4 Oct 2023 09:01:57 +0000 Subject: [PATCH 7/7] Update docs --- docs/config/configuration.md | 2 +- docs/config/directives.md | 2 +- docs/syntax/entityRelationshipDiagram.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/config/configuration.md b/docs/config/configuration.md index 1e85427ea..eb703a9d2 100644 --- a/docs/config/configuration.md +++ b/docs/config/configuration.md @@ -10,7 +10,7 @@ When mermaid starts, configuration is extracted to determine a configuration to - The default configuration - Overrides at the site level are set by the initialize call, and will be applied to all diagrams in the site/app. The term for this is the **siteConfig**. -- Frontmatter (v\+) - diagram authors can update select configuration parameters in the frontmatter of the diagram. These are applied to the render config. +- Frontmatter (v10.5.0+) - diagram authors can update select configuration parameters in the frontmatter of the diagram. These are applied to the render config. - Directives (Deprecated by Frontmatter) - diagram authors can update select configuration parameters directly in the diagram code via directives. These are applied to the render config. **The render config** is configuration that is used when rendering by applying these configurations. diff --git a/docs/config/directives.md b/docs/config/directives.md index 943d51217..533126263 100644 --- a/docs/config/directives.md +++ b/docs/config/directives.md @@ -7,7 +7,7 @@ # Directives > **Warning** -> Directives are deprecated from v\. Please use the `config` key in frontmatter to pass configuration. See [Configuration](./configuration.md) for more details. +> Directives are deprecated from v10.5.0. Please use the `config` key in frontmatter to pass configuration. See [Configuration](./configuration.md) for more details. ## Directives diff --git a/docs/syntax/entityRelationshipDiagram.md b/docs/syntax/entityRelationshipDiagram.md index 94e4048f0..b673ac1dd 100644 --- a/docs/syntax/entityRelationshipDiagram.md +++ b/docs/syntax/entityRelationshipDiagram.md @@ -90,7 +90,7 @@ Mermaid syntax for ER diagrams is compatible with PlantUML, with an extension to Where: -- `first-entity` is the name of an entity. Names must begin with an alphabetic character or an underscore (from v\+), and may also contain digits and hyphens. +- `first-entity` is the name of an entity. Names must begin with an alphabetic character or an underscore (from v10.5.0+), and may also contain digits and hyphens. - `relationship` describes the way that both entities inter-relate. See below. - `second-entity` is the name of the other entity. - `relationship-label` describes the relationship from the perspective of the first entity. @@ -198,7 +198,7 @@ erDiagram The `type` values must begin with an alphabetic character and may contain digits, hyphens, underscores, parentheses and square brackets. The `name` values follow a similar format to `type`, but may start with an asterisk as another option to indicate an attribute is a primary key. Other than that, there are no restrictions, and there is no implicit set of valid data types. -### Entity Name Aliases (v\+) +### Entity Name Aliases (v10.5.0+) An alias can be added to an entity using square brackets. If provided, the alias will be showed in the diagram instead of the entity name.