From c55add73f61149847309e38f169c14ffd68e44b7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 9 Oct 2022 21:00:02 +0800 Subject: [PATCH 1/4] docs: Add link to docs source --- docs/8.6.0_docs.md | 2 +- docs/CHANGELOG.md | 2 +- docs/Configuration.md | 2 +- docs/README.md | 2 +- docs/SUMMARY.md | 2 +- docs/Setup.md | 2 +- docs/Tutorials.md | 2 +- docs/_navbar.md | 2 +- docs/_sidebar.md | 2 +- docs/accessibility.md | 2 +- docs/breakingChanges.md | 2 +- docs/c4c.md | 2 +- docs/classDiagram.md | 2 +- docs/developer-docs/configuration.md | 2 +- docs/development.md | 2 +- docs/diagrams-and-syntax-and-examples/flowchart.md | 2 +- docs/directives.md | 2 +- docs/entityRelationshipDiagram.md | 2 +- docs/examples.md | 2 +- docs/faq.md | 2 +- docs/flowchart.md | 2 +- docs/gantt.md | 2 +- docs/gitgraph.md | 2 +- docs/index.html | 2 +- docs/integrations.md | 2 +- docs/introduction.md | 2 +- docs/landing/index.html | 2 +- docs/mermaidCLI.md | 2 +- docs/mindmap.md | 2 +- docs/n00b-advanced.md | 2 +- docs/n00b-gettingStarted.md | 2 +- docs/n00b-overview.md | 2 +- docs/n00b-syntaxReference.md | 2 +- docs/newDiagram.md | 2 +- docs/pie.md | 2 +- docs/requirementDiagram.md | 2 +- docs/security.md | 2 +- docs/sequenceDiagram.md | 2 +- docs/stateDiagram.md | 2 +- docs/theming.md | 2 +- docs/upgrading.md | 2 +- docs/usage.md | 2 +- docs/user-journey.md | 2 +- packages/mermaid/src/docs.mts | 10 ++++++---- 44 files changed, 49 insertions(+), 47 deletions(-) diff --git a/docs/8.6.0_docs.md b/docs/8.6.0_docs.md index cc812901e..11940c622 100644 --- a/docs/8.6.0_docs.md +++ b/docs/8.6.0_docs.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/8.6.0_docs.md](../packages/mermaid/src/docs/8.6.0_docs.md). # Version 8.6.0 Changes diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 7dbfecee4..95c5c14c9 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/CHANGELOG.md](../packages/mermaid/src/docs/CHANGELOG.md). # Change Log diff --git a/docs/Configuration.md b/docs/Configuration.md index 4902dabdb..672925383 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/Configuration.md](../packages/mermaid/src/docs/Configuration.md). # Configuration diff --git a/docs/README.md b/docs/README.md index 62f5b9d9b..403b81d5f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/README.md](../packages/mermaid/src/docs/README.md). # About Mermaid diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 41156fee5..21c0032b0 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/SUMMARY.md](../packages/mermaid/src/docs/SUMMARY.md). # Summary diff --git a/docs/Setup.md b/docs/Setup.md index dec513498..952dc5c5d 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/Setup.md](../packages/mermaid/src/docs/Setup.md). diff --git a/docs/Tutorials.md b/docs/Tutorials.md index 0f9465a35..14f6dabac 100644 --- a/docs/Tutorials.md +++ b/docs/Tutorials.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/Tutorials.md](../packages/mermaid/src/docs/Tutorials.md). # Tutorials diff --git a/docs/_navbar.md b/docs/_navbar.md index 7f9f495a7..3721b2f4e 100644 --- a/docs/_navbar.md +++ b/docs/_navbar.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/\_navbar.md](../packages/mermaid/src/docs/_navbar.md). - Getting started diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 17cde68c9..a7872f609 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/\_sidebar.md](../packages/mermaid/src/docs/_sidebar.md). - 📔 Introduction diff --git a/docs/accessibility.md b/docs/accessibility.md index 09d80df65..dfcb139e7 100644 --- a/docs/accessibility.md +++ b/docs/accessibility.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/accessibility.md](../packages/mermaid/src/docs/accessibility.md). # Accessibility Options diff --git a/docs/breakingChanges.md b/docs/breakingChanges.md index 964d89e4f..27229e525 100644 --- a/docs/breakingChanges.md +++ b/docs/breakingChanges.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/breakingChanges.md](../packages/mermaid/src/docs/breakingChanges.md). # Breaking changes diff --git a/docs/c4c.md b/docs/c4c.md index 4f9e09ab5..c763765b1 100644 --- a/docs/c4c.md +++ b/docs/c4c.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/c4c.md](../packages/mermaid/src/docs/c4c.md). # C4 Diagrams diff --git a/docs/classDiagram.md b/docs/classDiagram.md index 529933b98..49ecc0e23 100644 --- a/docs/classDiagram.md +++ b/docs/classDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/classDiagram.md](../packages/mermaid/src/docs/classDiagram.md). # Class diagrams diff --git a/docs/developer-docs/configuration.md b/docs/developer-docs/configuration.md index ba3422f6d..8188396ae 100644 --- a/docs/developer-docs/configuration.md +++ b/docs/developer-docs/configuration.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/developer-docs/configuration.md](../packages/mermaid/src/docs/developer-docs/configuration.md). # Configuration diff --git a/docs/development.md b/docs/development.md index 3f2033d61..ac261e44c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/development.md](../packages/mermaid/src/docs/development.md). # Development and Contribution 🙌 diff --git a/docs/diagrams-and-syntax-and-examples/flowchart.md b/docs/diagrams-and-syntax-and-examples/flowchart.md index a55c6292a..c5eb838a4 100644 --- a/docs/diagrams-and-syntax-and-examples/flowchart.md +++ b/docs/diagrams-and-syntax-and-examples/flowchart.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md](../packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md). --- diff --git a/docs/directives.md b/docs/directives.md index f814782f0..5d8407d9b 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/directives.md](../packages/mermaid/src/docs/directives.md). # Directives diff --git a/docs/entityRelationshipDiagram.md b/docs/entityRelationshipDiagram.md index 78d058e78..186530750 100644 --- a/docs/entityRelationshipDiagram.md +++ b/docs/entityRelationshipDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/entityRelationshipDiagram.md](../packages/mermaid/src/docs/entityRelationshipDiagram.md). # Entity Relationship Diagrams diff --git a/docs/examples.md b/docs/examples.md index b3175edac..62f2c6088 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/examples.md](../packages/mermaid/src/docs/examples.md). # Examples diff --git a/docs/faq.md b/docs/faq.md index a24b436b6..0d8920178 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/faq.md](../packages/mermaid/src/docs/faq.md). # Frequently Asked Questions diff --git a/docs/flowchart.md b/docs/flowchart.md index fd2c95ffe..91efca6f7 100644 --- a/docs/flowchart.md +++ b/docs/flowchart.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/flowchart.md](../packages/mermaid/src/docs/flowchart.md). # Flowcharts - Basic Syntax diff --git a/docs/gantt.md b/docs/gantt.md index 9246f24dd..279ba5202 100644 --- a/docs/gantt.md +++ b/docs/gantt.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/gantt.md](../packages/mermaid/src/docs/gantt.md). # Gantt diagrams diff --git a/docs/gitgraph.md b/docs/gitgraph.md index 8efbf9fa5..b4269d7c6 100644 --- a/docs/gitgraph.md +++ b/docs/gitgraph.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/gitgraph.md](../packages/mermaid/src/docs/gitgraph.md). # Gitgraph Diagrams diff --git a/docs/index.html b/docs/index.html index c4eb48af8..dfeae9b8b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ - + mermaid - Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, diff --git a/docs/integrations.md b/docs/integrations.md index 09df7cf9f..df973f702 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/integrations.md](../packages/mermaid/src/docs/integrations.md). # Integrations diff --git a/docs/introduction.md b/docs/introduction.md index 72235794a..c092b76ee 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1 +1 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/introduction.md](../packages/mermaid/src/docs/introduction.md). diff --git a/docs/landing/index.html b/docs/landing/index.html index 2504d0580..044ee679c 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html lang="en"> - <!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs.--><head> + <!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/landing/index.html](../packages/mermaid/src/docs/landing/index.html).--><head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> diff --git a/docs/mermaidCLI.md b/docs/mermaidCLI.md index 01860cab2..239b3f235 100644 --- a/docs/mermaidCLI.md +++ b/docs/mermaidCLI.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/mermaidCLI.md](../packages/mermaid/src/docs/mermaidCLI.md). # mermaid CLI diff --git a/docs/mindmap.md b/docs/mindmap.md index 94baf43e0..513abc5fe 100644 --- a/docs/mindmap.md +++ b/docs/mindmap.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/mindmap.md](../packages/mermaid/src/docs/mindmap.md). # Mindmap diff --git a/docs/n00b-advanced.md b/docs/n00b-advanced.md index e6a6adcc3..e24b079da 100644 --- a/docs/n00b-advanced.md +++ b/docs/n00b-advanced.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/n00b-advanced.md](../packages/mermaid/src/docs/n00b-advanced.md). # Advanced n00b mermaid (Coming soon..) diff --git a/docs/n00b-gettingStarted.md b/docs/n00b-gettingStarted.md index b82e2ff01..d6d0da3e8 100644 --- a/docs/n00b-gettingStarted.md +++ b/docs/n00b-gettingStarted.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/n00b-gettingStarted.md](../packages/mermaid/src/docs/n00b-gettingStarted.md). # A Mermaid User-Guide for Beginners diff --git a/docs/n00b-overview.md b/docs/n00b-overview.md index df400e4bb..58078723b 100644 --- a/docs/n00b-overview.md +++ b/docs/n00b-overview.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/n00b-overview.md](../packages/mermaid/src/docs/n00b-overview.md). # Overview for Beginners diff --git a/docs/n00b-syntaxReference.md b/docs/n00b-syntaxReference.md index 2c9ef7207..85a7e688c 100644 --- a/docs/n00b-syntaxReference.md +++ b/docs/n00b-syntaxReference.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/n00b-syntaxReference.md](../packages/mermaid/src/docs/n00b-syntaxReference.md). # Diagram Syntax diff --git a/docs/newDiagram.md b/docs/newDiagram.md index 070865702..f03749982 100644 --- a/docs/newDiagram.md +++ b/docs/newDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/newDiagram.md](../packages/mermaid/src/docs/newDiagram.md). # Adding a New Diagram/Chart 📊 diff --git a/docs/pie.md b/docs/pie.md index f59efd93a..c57f35483 100644 --- a/docs/pie.md +++ b/docs/pie.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/pie.md](../packages/mermaid/src/docs/pie.md). # Pie chart diagrams diff --git a/docs/requirementDiagram.md b/docs/requirementDiagram.md index cf4c4bdc6..c48e61f82 100644 --- a/docs/requirementDiagram.md +++ b/docs/requirementDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/requirementDiagram.md](../packages/mermaid/src/docs/requirementDiagram.md). # Requirement Diagram diff --git a/docs/security.md b/docs/security.md index cac6d8da2..8b9d9bc58 100644 --- a/docs/security.md +++ b/docs/security.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/security.md](../packages/mermaid/src/docs/security.md). # Security diff --git a/docs/sequenceDiagram.md b/docs/sequenceDiagram.md index 619f33243..71ac19ffc 100644 --- a/docs/sequenceDiagram.md +++ b/docs/sequenceDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/sequenceDiagram.md](../packages/mermaid/src/docs/sequenceDiagram.md). # Sequence diagrams diff --git a/docs/stateDiagram.md b/docs/stateDiagram.md index ecea7cf5d..e7ade930b 100644 --- a/docs/stateDiagram.md +++ b/docs/stateDiagram.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/stateDiagram.md](../packages/mermaid/src/docs/stateDiagram.md). # State diagrams diff --git a/docs/theming.md b/docs/theming.md index c2dd3f2ae..1a09eb868 100644 --- a/docs/theming.md +++ b/docs/theming.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/theming.md](../packages/mermaid/src/docs/theming.md). # Theme Configuration diff --git a/docs/upgrading.md b/docs/upgrading.md index 884326fb7..cd0fa93af 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/upgrading.md](../packages/mermaid/src/docs/upgrading.md). # Upgrading diff --git a/docs/usage.md b/docs/usage.md index be986a56b..4f28b809d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/usage.md](../packages/mermaid/src/docs/usage.md). # Usage diff --git a/docs/user-journey.md b/docs/user-journey.md index e40efc5a9..423f13c58 100644 --- a/docs/user-journey.md +++ b/docs/user-journey.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in packages/mermaid/src/docs. +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/user-journey.md](../packages/mermaid/src/docs/user-journey.md). # User Journey Diagram diff --git a/packages/mermaid/src/docs.mts b/packages/mermaid/src/docs.mts index a22dc59e2..59bcfc544 100644 --- a/packages/mermaid/src/docs.mts +++ b/packages/mermaid/src/docs.mts @@ -46,8 +46,6 @@ import flatmap from 'unist-util-flatmap'; const SOURCE_DOCS_DIR = 'packages/mermaid/src/docs'; const FINAL_DOCS_DIR = 'docs'; -const AUTOGENERATED_TEXT = `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the corresponding file in ${SOURCE_DOCS_DIR}.`; - const LOGMSG_TRANSFORMED = 'transformed'; const LOGMSG_TO_BE_TRANSFORMED = 'to be transformed'; const LOGMSG_COPIED = `, and copied to ${FINAL_DOCS_DIR}`; @@ -68,6 +66,10 @@ const prettierConfig: prettier.Config = { let filesWereTransformed = false; +const generateHeader = (file: string): string => { + return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](../${file}).`; +}; + /** * Given a source file name and path, return the documentation destination full path and file name * Create the destination path if it does not already exist. @@ -160,7 +162,7 @@ const transformMarkdown = (file: string) => { }); // Add the AUTOGENERATED_TEXT to the start of the file - const transformed = `${AUTOGENERATED_TEXT}\n${remark.stringify(out)}`; + const transformed = `${generateHeader(file)}\n${remark.stringify(out)}`; const formatted = prettier.format(transformed, { parser: 'markdown', ...prettierConfig, @@ -188,7 +190,7 @@ const transformHtml = (filename: string) => { const fileContents = readSyncedUTF8file(fileName); const jsdom = new JSDOM(fileContents); const htmlDoc = jsdom.window.document; - const autoGeneratedComment = jsdom.window.document.createComment(AUTOGENERATED_TEXT); + const autoGeneratedComment = jsdom.window.document.createComment(generateHeader(fileName)); const rootElement = htmlDoc.documentElement; rootElement.prepend(autoGeneratedComment); From 8e93ffffc67ce0dbb8659af37fa502e06b59bf1f Mon Sep 17 00:00:00 2001 From: Sidharth Vinod <sidharthv96@gmail.com> Date: Sun, 9 Oct 2022 21:11:11 +0800 Subject: [PATCH 2/4] docs: Fix docs path in Contributing.md --- CONTRIBUTING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7efa8e41..2234d5148 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,16 +39,16 @@ Less strict here, it is OK to commit directly in the `develop` branch if you are The documentation is written in **Markdown**. For more information about Markdown [see the GitHub Markdown help page](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax). -### Documentation source files are in /src/docs +### Documentation source files are in [`/packages/mermaid/src/docs`](packages/mermaid/src/docs) -The source files for the project documentation are located in the `/src/docs` directory. This is where you should make changes. -The files under `/src/docs` are processed to generate the published documentation, and the resulting files are put into the `/docs` directory. +The source files for the project documentation are located in the [`/packages/mermaid/src/docs`](packages/mermaid/src/docs) directory. This is where you should make changes. +The files under `/packages/mermaid/src/docs` are processed to generate the published documentation, and the resulting files are put into the `/docs` directory. ```mermaid flowchart LR classDef default fill:#fff,color:black,stroke:black - source["files in /src/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"] + source["files in /packages/mermaid/src/docs\n(changes should be done here)"] -- automatic processing\nto generate the final documentation--> published["files in /docs\ndisplayed on the official documentation site"] ``` @@ -137,7 +137,7 @@ it('should render forks and joins', () => { Finally, if it is not in the documentation, no one will know about it and then **no one will use it**. Wouldn't that be sad? With all the effort that was put into the feature? -The source files for documentation are in `/src/docs` and are written in markdown. Just pick the right section and start typing. See the [Committing Documentation](#committing-documentation) section for more about how the documentation is generated. +The source files for documentation are in `/packages/mermaid/src/docs` and are written in markdown. Just pick the right section and start typing. See the [Committing Documentation](#committing-documentation) section for more about how the documentation is generated. #### Adding to or changing the documentation organization From d03fdfdbcab45ddcf224e7f288033dcded38d10c Mon Sep 17 00:00:00 2001 From: Sidharth Vinod <sidharthv96@gmail.com> Date: Thu, 13 Oct 2022 13:48:00 +0530 Subject: [PATCH 3/4] Update packages/mermaid/src/docs.mts Co-authored-by: Alois Klink <alois@aloisklink.com> --- packages/mermaid/src/docs.mts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/mermaid/src/docs.mts b/packages/mermaid/src/docs.mts index 59bcfc544..bf03741a7 100644 --- a/packages/mermaid/src/docs.mts +++ b/packages/mermaid/src/docs.mts @@ -67,7 +67,9 @@ const prettierConfig: prettier.Config = { let filesWereTransformed = false; const generateHeader = (file: string): string => { - return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](../${file}).`; + // path from file in docs/* to repo root, e.g ../ or ../../ */ + const rootDirectory = relative(file, "packages/mermaid/src/docs"); + return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${join(rootDirectory, file)}).`; }; /** From d62c2d1e228b2a0e47aefc264dcc12e5a2af9d08 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod <sidharthv96@gmail.com> Date: Thu, 13 Oct 2022 13:51:27 +0530 Subject: [PATCH 4/4] fix: relative paths --- docs/developer-docs/configuration.md | 2 +- docs/diagrams-and-syntax-and-examples/flowchart.md | 2 +- docs/landing/index.html | 2 +- packages/mermaid/src/docs.mts | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/developer-docs/configuration.md b/docs/developer-docs/configuration.md index 8188396ae..03a32f313 100644 --- a/docs/developer-docs/configuration.md +++ b/docs/developer-docs/configuration.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/developer-docs/configuration.md](../packages/mermaid/src/docs/developer-docs/configuration.md). +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/developer-docs/configuration.md](../../packages/mermaid/src/docs/developer-docs/configuration.md). # Configuration diff --git a/docs/diagrams-and-syntax-and-examples/flowchart.md b/docs/diagrams-and-syntax-and-examples/flowchart.md index 3dd4069cd..6257c8afb 100644 --- a/docs/diagrams-and-syntax-and-examples/flowchart.md +++ b/docs/diagrams-and-syntax-and-examples/flowchart.md @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md](../packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md). +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md](../../packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md). --- diff --git a/docs/landing/index.html b/docs/landing/index.html index 044ee679c..e8d0c89c4 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html lang="en"> - <!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/landing/index.html](../packages/mermaid/src/docs/landing/index.html).--><head> + <!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/landing/index.html](../../packages/mermaid/src/docs/landing/index.html).--><head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> diff --git a/packages/mermaid/src/docs.mts b/packages/mermaid/src/docs.mts index f415cfb0a..8b6041cc5 100644 --- a/packages/mermaid/src/docs.mts +++ b/packages/mermaid/src/docs.mts @@ -35,7 +35,7 @@ import { exec } from 'child_process'; import { globby } from 'globby'; import { JSDOM } from 'jsdom'; import type { Code, Root } from 'mdast'; -import { posix, dirname } from 'path'; +import { posix, dirname, relative } from 'path'; import prettier from 'prettier'; import { remark } from 'remark'; // @ts-ignore No typescript declaration file @@ -72,8 +72,11 @@ let filesWereTransformed = false; const generateHeader = (file: string): string => { // path from file in docs/* to repo root, e.g ../ or ../../ */ - const rootDirectory = relative(file, "packages/mermaid/src/docs"); - return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${join(rootDirectory, file)}).`; + const rootDirectory = relative(file, SOURCE_DOCS_DIR); + return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${posix.join( + rootDirectory, + file + )}).`; }; /**