构建docfx后PlantUml不呈现图

时间:2018-10-23 06:10:06

标签: c# plantuml docfx

https://github.com/KevReed/DocFx.Plugins.PlantUml

我已经通过nuget为docfx插件安装了plantUml。通过nuget install DocFx.Plugins.PlantUml -ExcludeVersion -OutputDirectory .命令,之后在构建docfx之后得到了这个结果, 我在localhost上检查了index.html,但没有用。我看不到plantuml图,只有纯文本框。 如果您有任何想法请帮助我。 我检查了内置HTML上的<code class="lang-plantuml">标签。

这是我的环境。

macOS Sierra 10.12.6    
NuGet Version: 4.7.0.5148    
docfx Version: 2.38.1.0   

[路径]

(projectfolder)/docfx.json    
(projectfolder)/plantuml.jar    
(projectfolder)/DocFx.Plugins.PlantUml   

[docfx.json]

{
  "metadata": [
    {
      "src": [
        {
          "files": [
            "**/**.cs"
          ],
          "src":"../localizedstring"
        }
      ],
      "dest": "api",
      "disableGitFeatures": false,
      "disableDefaultFilter": false
    }
  ],
  "build": {
    "content": [
      {
        "files": [
          "api/**.yml",
          "api/index.md"
        ]
      },
      {
        "files": [
          "articles/**.md",
          "articles/**/toc.yml",
          "toc.yml",
          "*.md"
        ]
      }
    ],
    "resource": [
      {
        "files": [
          "images/**"
        ]
      }
    ],
    "overwrite": [
      {
        "files": [
          "apidoc/**.md"
        ],
        "exclude": [
          "obj/**",
          "_site/**"
        ]
      }
    ],
    "dest": "_site",
    "globalMetadataFiles": [],
    "fileMetadataFiles": [],
    "template": [
        "default",
        "DocFx.Plugins.PlantUml/template"
    ],
    "postProcessors": [],
    "markdownEngineName": "markdig",
    "markdownEngineProperties": {
        "plantUml.renderingMode":"local"
    },
    "noLangKeyword": false,
    "keepFileLink": false,
    "cleanupCacheHistory": false,
    "disableGitFeatures": false
  }
}

[intro.md]

# Add your introductions here!
'''plantuml
IntroBob -> IntroAlice : intro
Alice -> Bob : Go Away
''' // this is not (') I inserted(`)

[docfx版本]

➜  docfx_project docfx --serve
[18-10-23 05:20:56.495]Info:Config file docfx.json found, start generating metadata...
[18-10-23 05:20:56.794]Info:[MetadataCommand.ExtractMetadata]Loading projects...
[18-10-23 05:20:56.838]Info:[MetadataCommand.ExtractMetadata]'/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffers/ByteBuffer.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffers/FlatBufferBuilder.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffers/FlatBufferConstants.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffers/Struct.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffers/Table.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffersIDLClass/LocalizedStringData.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/FlatBuffersIDLClass/LocalizedStringDataEntry.cs,/Users/seonmyeong.kim/KSM/plantumltest/localizedstring/LocalizedString/Loader/StringLoader.cs' keep up-to-date since '2018/10/23 5:13:47', cached result from '/Users/seonmyeong.kim/KSM/plantumltest/docfx_project/api' is used.
[18-10-23 05:20:56.846]Info:[MetadataCommand]Completed Scope:MetadataCommand in 244.8242 milliseconds.
[18-10-23 05:20:56.895]Info:[BuildCommand]Plug-in directory: /usr/local/Cellar/docfx/2.38.1/libexec/plugins_sqtdx5e4.7jy/plugins, configuration file: /usr/local/Cellar/docfx/2.38.1/libexec/plugins_sqtdx5e4.7jy/plugins/docfx.plugins.config
[18-10-23 05:20:57.316]Info:[ImportPlugins]Searching custom plugins in directory /usr/local/Cellar/docfx/2.38.1/libexec/plugins_sqtdx5e4.7jy/plugins...
[18-10-23 05:20:57.319]Warning:[ImportPlugins]Skipping file /usr/local/Cellar/docfx/2.38.1/libexec/plugins_sqtdx5e4.7jy/plugins/System.Net.Http.dll due to load failure: Could not load file or assembly 'System.Net.Http' or one of its dependencies
[18-10-23 05:20:57.471]Info:6 plug-in(s) loaded.
[18-10-23 05:20:57.594]Info:No files are found with glob pattern apidoc/**.md, excluding obj/**,_site/**, under directory "/Users/seonmyeong.kim/KSM/plantumltest/docfx_project"
[18-10-23 05:20:57.596]Info:No files are found with glob pattern images/**, excluding <none>, under directory "/Users/seonmyeong.kim/KSM/plantumltest/docfx_project"
[18-10-23 05:20:57.606]Info:Markdown engine is markdig
[18-10-23 05:20:58.032]Info:[BuildCore.Build Document]Max parallelism is 8.
[18-10-23 05:20:58.100]Info:[BuildCore.Build Document.Prepare.CreateIncrementalBuildContext]Build strategy: IsIncrementalBuild
[18-10-23 05:20:58.414]Info:[BuildCore.Build Document.CompilePhaseHandlerWithIncremental.ManagedReferenceDocumentProcessor]Building 0 file(s) in ManagedReferenceDocumentProcessor(BuildManagedReferenceDocument=>ValidateManagedReferenceDocumentMetadata=>ApplyOverwriteDocumentForMref=>FillReferenceInformation)...
[18-10-23 05:20:58.415]Info:[BuildCore.Build Document.CompilePhaseHandlerWithIncremental.ConceptualDocumentProcessor]Building 0 file(s) in ConceptualDocumentProcessor(BuildConceptualDocument=>CountWord=>ValidateConceptualDocumentMetadata)...
[18-10-23 05:20:58.415]Info:[BuildCore.Build Document.CompilePhaseHandlerWithIncremental.TocDocumentProcessor]Building 3 file(s) in TocDocumentProcessor(BuildTocDocument)...
[18-10-23 05:20:58.663]Info:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.UpdateContext]0 external references found in 1 xref maps.
[18-10-23 05:20:58.737]Info:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.Apply Templates]Applying templates to 3 model(s)...
[18-10-23 05:20:59.000]Info:[BuildCore.Build Document]XRef map exported.
[18-10-23 05:20:59.101]Info:[Postprocess]Manifest file saved to manifest.json.
[18-10-23 05:20:59.130]Info:Completed building documents in 1653.1787 milliseconds.
[18-10-23 05:20:59.181]Info:[BuildCommand]Cleaning up temporary plugin folder "/usr/local/Cellar/docfx/2.38.1/libexec/plugins_sqtdx5e4.7jy"
Serving "/Users/seonmyeong.kim/KSM/plantumltest/docfx_project/_site" on http://localhost:8080

result page

1 个答案:

答案 0 :(得分:0)

您应该删除

"markdownEngineName": "markdig"