asciidoctor 安装试用
2024-08-27 19:29:44
备注:
asciidoctor 是asciidoc 的增强,使用简单,模板比较丰富,对于持续集成方面的开发也是一个不错的工具
1. 安装
a. 环境准备
MRI Ruby 1.8.7, 1.9.3, 2.0, 2.1, 2.2 & 2.3
JRuby 1.7 in Ruby 1.8 and 1.9 modes, 9000
Rubinius 2.2.x
实际上 需要的是ruby jruby ,其他的不是必须的
b. 安装
yum insatll -y ruby
jruby 安装包下载安装
wget https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.1.15.0/jruby-dist-9.1.15.0-bin.tar.gz
后面配置环境变量即可
gem install asciidoctor 如果慢,可以替换 gem 源 gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
2. 使用
参考源码 https://github.com/mraible/infoq-mini-book.git
实际上只需要src/docs 文件
asciidoctor index.adoc
生成的效果
3. pdf 格式生成
a. 安装插件
gem install asciidoctor-pdf
b. 使用方式
asciidoctor-pdf index.adoc
生成效果
4. docker 使用
a. 镜像拉取
docker pull asciidoctor/docker-asciidoctor
b. 启动
docker run -it -v your directory:/documents/ asciidoctor/docker-asciidoctor
c. 运行生成对应类似文档
已经包含的工具集
asciidoctor asciidoctor-epub3 asciidoctor-revealjs
asciidoctor-confluence asciidoctor-pdf asciidoctor-safe
比如:
pdf: asciidoctor-pdf index.adoc
5. 总结
实际上spring 项目使用asciidoctor 构建的还是比较多的,对于大家在进行微服务以及持续集成中结合
swagger,或者类似的api 文档生活工具,可以方便高效的进行系统的开发设计,提高生产力
6. 参考资料
https://github.com/mraible/infoq-mini-book.git
http://asciidoctor.org/
最新文章
- Windows Azure Web Site (11) 使用源代码管理器管理Azure Web Site
- poj-3739. Special Squares(二维前缀和)
- PHP 中和 HTTP 相关的函数及使用
- hdu 2092
- DELL服务器SAS 5 I_R 完全配置手册
- PS:抠图方法1(利用对比度ctrl+l)
- C/C++中substr函数的应用(简单讲解)
- logistics回归理解
- flag:用心学习的第一天
- grub.conf解析
- 100BASE-TX、100Base-FX等含义
- SaaS产品成功学
- MVC实战之排球计分(二)—— 构架概要设计
- 【380】python 获取列表排序后的索引列表
- Tomcat学习总结(15)—— Tomcat优化时的参数分析
- python学习笔记之——文件I/O
- linux内核分析第六周-分析Linux内核创建一个新进程的过程
- Lite OS学习之事件EVENT
- Linux下libevent安装与示例
- Asp.Net MVC4 之Url路由