一、安装Chocolatey
- 以管理员身份运行 PowerShell
- 执行以下命令
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- 检查是否安装成功
choco -?
命令能够正常运行说明安装成功
二、使用Chocolatey安装Ruby
参考官网文档:https://asciidoctor.org/#c-windows
- 在CMD中执行安装命令
choco install ruby
提示:安装过程中需要手动输入y执行安装脚本
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y
- 检查是否安装成功
gem -h
命令能够正常运行说明安装成功
三、安装Asciidoctor
- 使用gem安装Asciidoctor
gem install asciidoctor
- 使用命令行asciidocer将adoc转换为html
asciidoctor README.adoc
Asciidocter官方推荐客户端
AsciiDocFX
参考官方:https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/#asciidocfx
网友评论