zoukankan      html  css  js  c++  java
  • asciidoctor 安装试用

    备注:

       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/
  • 相关阅读:
    memcached使用入门
    winform代码生成器(三)
    Spark + sbt + IDEA + HelloWorld + MacOS
    CentOS下Hive搭建
    36. 有效的数独
    HADOOP依赖
    判别数字图片能否「一笔完成」
    【网易微专业】图表绘制工具Matplotlib
    【18.065】Lecture2
    【18.065】Lecture1
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/8036445.html
Copyright © 2011-2022 走看看