首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >卡在Mkdocs中的PlantUml

卡在Mkdocs中的PlantUml
EN

Stack Overflow用户
提问于 2021-11-10 14:55:34
回答 1查看 661关注 0票数 0

我正在为我的PlantUML安装配置MkDocs插件,而且我被卡住了。我无法正确配置mkdocs.yml。每次启用这个插件时,我都会得到配置错误或解析错误。

这些错误是:

代码语言:javascript
复制
ERROR    -  Config value: 'plugins'. Error: Invalid config options for the > 'build_plantuml' plugin.

Error: MkDocs encountered an error parsing the configuration file:
while parsing a block mapping
 in "/home/igor/mksite/mkdocs.yml", line 1, column 1
expected <block end>, but found '<block mapping start>'
 in "/home/igor/mksite/mkdocs.yml", line 17, column 5

Error: MkDocs encountered an error parsing the configuration file:
mapping values are not allowed here
in "/home/igor/mksite/mkdocs.yml", line 15, column 13

我的问题是什么?

这是我的mkdocs.yml文件:

代码语言:javascript
复制
site_name: CardsMobile
site_url: http://127.0.0.1:8000/
nav:
- index: index.md
- simplePage: simplePage.md
- testUml: testuml.md
- images: images.md
docs_dir: /home/igor/mksite/docs
repo_url: https://github.com/ishahbazyan/mkdocs-test.git/
repo_name: mkdocs-test

plugins:
- search
- build_plantuml:
  - render: local # or "local" for local rendering
  - bin_path: /home/igor/mksite/ # ignored when render: server
  - server: http://www.plantuml.com/plantuml # offical plantuml server
  - output_format: svg # or "png"
  - diagram_root: docs/diagrams # should reside under docs_dir
  - output_folder: out
  - input_folder: src
  - input_extensions: puml # comma separated list of extensions to parse, by default every file is parsed```
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-31 11:30:59

我正在使用mkdocs与插件在类似的配置。我相信这个错误是从- bin_path: /home/igor/mksite/ # ignored when render: server开始的。它期望有一个二进制文件,可以执行plantuml。我在Windows中,所以在我的例子中,我有一个.bat文件调用plantuml.jar可执行文件。

应该将路径添加到二进制plantuml文件中。或者使用选项server

代码语言:javascript
复制
  - render: server # or "local" for local rendering

若要使用plantuml服务器呈现以下内容:

代码语言:javascript
复制
  - server: http://www.plantuml.com/plantuml # offical plantuml server

希望这是有用的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69915470

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档