备注:

   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/
 
 
 
 

最新文章

  1. Windows Azure Web Site (11) 使用源代码管理器管理Azure Web Site
  2. poj-3739. Special Squares(二维前缀和)
  3. PHP 中和 HTTP 相关的函数及使用
  4. hdu 2092
  5. DELL服务器SAS 5 I_R 完全配置手册
  6. PS:抠图方法1(利用对比度ctrl+l)
  7. C/C++中substr函数的应用(简单讲解)
  8. logistics回归理解
  9. flag:用心学习的第一天
  10. grub.conf解析
  11. 100BASE-TX、100Base-FX等含义
  12. SaaS产品成功学
  13. MVC实战之排球计分(二)—— 构架概要设计
  14. 【380】python 获取列表排序后的索引列表
  15. Tomcat学习总结(15)—— Tomcat优化时的参数分析
  16. python学习笔记之——文件I/O
  17. linux内核分析第六周-分析Linux内核创建一个新进程的过程
  18. Lite OS学习之事件EVENT
  19. Linux下libevent安装与示例
  20. Asp.Net MVC4 之Url路由

热门文章

  1. Oracle中 如何用一个表的数据更新另一个表中的数据
  2. Runtime.getRuntime.exec();
  3. 《高级Web应用程序设计》疑难杂症(201709011)
  4. C语言实现顺序表
  5. JavaScript---循环与闭包
  6. 【hive】多表插入
  7. C# 设计模式巩固 - 单例模式
  8. 说说C++多重继承
  9. SpringInAction--Spring Web应用之SpringMvc 注解配置
  10. Content-type与json对象/字符串杂谈