diff --git a/src/C4Sharp/Models/Plantuml/PlantumlDiagram.cs b/src/C4Sharp/Models/Plantuml/PlantumlDiagram.cs index f3c64e8..a2b34e9 100644 --- a/src/C4Sharp/Models/Plantuml/PlantumlDiagram.cs +++ b/src/C4Sharp/Models/Plantuml/PlantumlDiagram.cs @@ -10,14 +10,18 @@ namespace C4Sharp.Models.Plantuml /// public static class PlantumlDiagram { + const string standardLibraryBaseUrl = "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master"; + /// /// Create PUML content from Diagram /// /// /// - public static string ToPumlString(this Diagram diagram) + public static string ToPumlString(this Diagram diagram, bool useUrlInclude = false) { - var path = Path.Join(C4Directory.ResourcesFolderName, $"{diagram.Name}.puml"); + var pumlFileName = $"{diagram.Name}.puml"; + var path = useUrlInclude ? $"{standardLibraryBaseUrl}/{pumlFileName}" + : Path.Join(C4Directory.ResourcesFolderName, pumlFileName); var stream = new StringBuilder(); stream.AppendLine($"@startuml {diagram.Slug()}");