6

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

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

这是我的环境。

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
  }
}

[介绍.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

结果页面

4

1 回答 1

0

你应该删除

"markdownEngineName": "markdig"
于 2018-11-26T07:28:47.613 回答