探索图解神器:Asciidoctor Kroki 扩展

探索图解神器:Asciidoctor Kroki 扩展

asciidoctor-kroki Asciidoctor.js extension to convert diagrams to images using Kroki! 项目地址: https://gitcode.com/gh_mirrors/as/asciidoctor-kroki

在这个数字化的时代,视觉表达成为了传达复杂信息的关键工具。这就是 Asciidoctor Kroki 扩展的用武之地——一个将文本描述转化为生动图表的强大工具,无缝集成在 Asciidoctor 生态系统中。无论您是文档撰写者还是开发者,Asciidoctor Kroki 都能帮助您以优雅的方式展示各种类型的图表。

项目简介

Asciidoctor Kroki 是一个基于 Node.js 和 Ruby 的扩展插件,可与 Asciidoctor.js 和 Asciidoctor 兼容,使用 Kroki 服务将 Markdown 或 AsciiDoc 文档中的图表语法直接转换为高质量图像。它支持多种图表类型,包括 PlantUML、Mermaid、Graphviz 等,让您的代码库或文档集更加丰富多彩。

技术分析

Asciidoctor Kroki 利用了 Asciidoctor 的强大扩展功能,提供了一种简单的方式来处理复杂的图表创建任务。通过在 Asciidoctor 中注册扩展,您可以方便地在各种环境下(如 Node.js、浏览器甚至 Ruby)使用它。在浏览器环境中,Kroki 还处理了文件读取和同步问题,确保跨平台的兼容性。

这个扩展的核心在于其与 Kroki 服务器的交互,后者是一个在线服务,能够实时处理多种图表语言并返回图片。这使得用户无需安装额外软件就能在文档中嵌入丰富的图表。

应用场景

Asciidoctor Kroki 可广泛应用于:

  1. 技术文档:在 API 文档、用户手册等中插入流程图、序列图和类图。
  2. 博客文章:在技术分享中添加互动式图表,提升阅读体验。
  3. 教学材料:在教程和示例代码中直观地展示逻辑结构。
  4. 会议演讲:在演示文稿中快速插入动态图表,使演讲更具吸引力。
  5. 项目管理:在项目计划和报告中用图形展示工作流。

项目特点

  1. 多语言支持:支持 PlantUML, Mermaid, Graphviz 等多种图表语言。
  2. 实时渲染:借助 Kroki 服务,图表在编写时即可预览,无需编译整个文档。
  3. 多环境适应:适用于 Node.js、浏览器以及 Ruby,且与 Antora 框架完美融合。
  4. 灵活配置:可以自定义设置输出格式、尺寸、链接属性,满足个性化需求。
  5. 易用性:简单的 API 和宏语法,让新手也能轻松上手。

为了充分利用 Asciidoctor Kroki 的功能,请访问项目页面获取详细安装指南和实例代码,开始您的图表之旅吧!项目地址

asciidoctor-kroki Asciidoctor.js extension to convert diagrams to images using Kroki! 项目地址: https://gitcode.com/gh_mirrors/as/asciidoctor-kroki

可能是因为您没有在 GitBook 的配置文件中设置生成目录的选项。您可以在 book.json 文件中添加以下代码: ``` "plugins": [ "expandable-chapters", "expandable-sections", "anchor-navigation-ex", "splitter", "tbfed-pagefooter", "tbfed-gitbook", "tbfed-navbar", "tbfed-sidebar", "tbfed-author", "tbfed-copy-code", "tbfed-mermaid", "tbfed-kroki" ], "pluginsConfig": { "anchor-navigation-ex": { "showLevel": false, "scrollToTop": true }, "tbfed-pagefooter": { "contribute": true, "contributeText": "Edit This Page", "github": "https://github.com/username/repo", "githubText": "GitHub", "slack": "https://slack.com/username", "slackText": "Slack", "twitter": "https://twitter.com/username", "twitterText": "Twitter", "wechat": "wechatid", "wechatText": "WeChat" }, "tbfed-gitbook": { "isMulti": false, "bookName": "GitBook", "bookLogo": "https://raw.githubusercontent.com/tbfed/tbfed-pagefooter/master/images/gitbook.png", "bookDescription": "GitBook 是一个基于 Node.js 的命令行工具,可用于创建漂亮的电子书。", "bookKeywords": "GitBook, Node.js, 电子书", "bookLanguage": "zh-hans", "bookDirection": "ltr", "bookRepository": "https://github.com/GitbookIO/gitbook.git", "bookHomepage": "https://www.gitbook.com/", "bookLicense": "MIT", "bookVersion": "3.2.3", "bookAuthor": "GitBook", "bookContributors": [ { "name": "Tommy Lau", "email": "tommy@tbfed.com", "url": "https://www.tbfed.com/" } ] }, "tbfed-navbar": { "websiteName": "GitBook", "websiteLogo": "https://raw.githubusercontent.com/tbfed/tbfed-pagefooter/master/images/gitbook.png", "fixed": true, "links": [ { "text": "Home", "link": "https://www.gitbook.com/" }, { "text": "Docs", "link": "https://docs.gitbook.com/" }, { "text": "Blog", "link": "https://www.gitbook.com/blog/" }, { "text": "Community", "link": "https://www.gitbook.com/community" } ] }, "tbfed-sidebar": { "isMulti": false, "intro": "GitBook 是一个基于 Node.js 的命令行工具,可用于创建漂亮的电子书。", "navs": [ { "name": "Getting Started", "link": "/getting-started.html", "icon": "fa fa-rocket", "subs": [ { "name": "Introduction", "link": "/getting-started/introduction.html" }, { "name": "Installation", "link": "/getting-started/installation.html" }, { "name": "Usage", "link": "/getting-started/usage.html" } ] }, { "name": "Configuration", "link": "/configuration.html", "icon": "fa fa-cog", "subs": [ { "name": "Basic", "link": "/configuration/basic.html" }, { "name": "Advanced", "link": "/configuration/advanced.html" } ] }, { "name": "Plugins", "link": "/plugins.html", "icon": "fa fa-plug", "subs": [ { "name": "Official Plugins", "link": "/plugins/official-plugins.html" }, { "name": "Third-party Plugins", "link": "/plugins/third-party-plugins.html" } ] }, { "name": "Themes", "link": "/themes.html", "icon": "fa fa-paint-brush", "subs": [ { "name": "Official Themes", "link": "/themes/official-themes.html" }, { "name": "Third-party Themes", "link": "/themes/third-party-themes.html" } ] } ] }, "tbfed-author": { "name": "GitBook", "email": "support@gitbook.com", "url": "https://www.gitbook.com/" }, "tbfed-copy-code": { "buttonText": "Copy", "color": "#ffffff", "bgColor": "#4d4d4d", "notifyText": "Copied!", "time": 1000 }, "tbfed-mermaid": { "theme": "default" }, "tbfed-kroki": { "url": "https://kroki.io", "diagrams": [ "blockdiag", "seqdiag", "actdiag", "nwdiag", "rackdiag", "packetdiag", "erd", "plantuml", "umlet", "vega", "vegalite", "wavedrom", "nomnoml", "svgbob" ] } } ``` 然后重新生成您的 GitBook 即可看到目录。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

宋溪普Gale

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值