asciidoctor 2.0.9 → 2.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +193 -16
  3. data/LICENSE +1 -1
  4. data/README-de.adoc +12 -13
  5. data/README-fr.adoc +11 -15
  6. data/README-jp.adoc +242 -185
  7. data/README-zh_CN.adoc +17 -18
  8. data/README.adoc +133 -131
  9. data/asciidoctor.gemspec +6 -6
  10. data/data/locale/attributes-ar.adoc +4 -3
  11. data/data/locale/attributes-be.adoc +23 -0
  12. data/data/locale/attributes-bg.adoc +4 -3
  13. data/data/locale/attributes-ca.adoc +6 -5
  14. data/data/locale/attributes-cs.adoc +4 -3
  15. data/data/locale/attributes-da.adoc +6 -5
  16. data/data/locale/attributes-de.adoc +4 -4
  17. data/data/locale/attributes-en.adoc +4 -4
  18. data/data/locale/attributes-es.adoc +6 -5
  19. data/data/locale/attributes-fa.adoc +4 -3
  20. data/data/locale/attributes-fi.adoc +4 -3
  21. data/data/locale/attributes-fr.adoc +6 -5
  22. data/data/locale/attributes-hu.adoc +4 -3
  23. data/data/locale/attributes-id.adoc +4 -3
  24. data/data/locale/attributes-it.adoc +6 -5
  25. data/data/locale/attributes-ja.adoc +4 -3
  26. data/data/locale/{attributes-kr.adoc → attributes-ko.adoc} +4 -3
  27. data/data/locale/attributes-nb.adoc +4 -3
  28. data/data/locale/attributes-nl.adoc +6 -5
  29. data/data/locale/attributes-nn.adoc +4 -3
  30. data/data/locale/attributes-pl.adoc +8 -7
  31. data/data/locale/attributes-pt.adoc +6 -5
  32. data/data/locale/attributes-pt_BR.adoc +6 -5
  33. data/data/locale/attributes-ro.adoc +4 -3
  34. data/data/locale/attributes-ru.adoc +6 -5
  35. data/data/locale/attributes-sr.adoc +4 -4
  36. data/data/locale/attributes-sr_Latn.adoc +4 -4
  37. data/data/locale/attributes-sv.adoc +4 -4
  38. data/data/locale/attributes-tr.adoc +4 -3
  39. data/data/locale/attributes-uk.adoc +6 -5
  40. data/data/locale/attributes-zh_CN.adoc +4 -3
  41. data/data/locale/attributes-zh_TW.adoc +4 -3
  42. data/data/reference/syntax.adoc +14 -7
  43. data/data/stylesheets/asciidoctor-default.css +30 -30
  44. data/lib/asciidoctor.rb +40 -14
  45. data/lib/asciidoctor/abstract_block.rb +9 -4
  46. data/lib/asciidoctor/abstract_node.rb +16 -6
  47. data/lib/asciidoctor/attribute_list.rb +63 -71
  48. data/lib/asciidoctor/cli/invoker.rb +2 -0
  49. data/lib/asciidoctor/cli/options.rb +10 -9
  50. data/lib/asciidoctor/convert.rb +167 -162
  51. data/lib/asciidoctor/converter.rb +13 -12
  52. data/lib/asciidoctor/converter/docbook5.rb +5 -9
  53. data/lib/asciidoctor/converter/html5.rb +58 -45
  54. data/lib/asciidoctor/converter/manpage.rb +61 -38
  55. data/lib/asciidoctor/converter/template.rb +3 -0
  56. data/lib/asciidoctor/document.rb +44 -51
  57. data/lib/asciidoctor/extensions.rb +2 -4
  58. data/lib/asciidoctor/helpers.rb +20 -15
  59. data/lib/asciidoctor/load.rb +102 -101
  60. data/lib/asciidoctor/parser.rb +40 -32
  61. data/lib/asciidoctor/path_resolver.rb +14 -12
  62. data/lib/asciidoctor/reader.rb +20 -13
  63. data/lib/asciidoctor/rx.rb +7 -6
  64. data/lib/asciidoctor/substitutors.rb +69 -50
  65. data/lib/asciidoctor/syntax_highlighter.rb +15 -7
  66. data/lib/asciidoctor/syntax_highlighter/coderay.rb +1 -1
  67. data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +12 -4
  68. data/lib/asciidoctor/syntax_highlighter/prettify.rb +7 -4
  69. data/lib/asciidoctor/syntax_highlighter/pygments.rb +6 -7
  70. data/lib/asciidoctor/syntax_highlighter/rouge.rb +33 -19
  71. data/lib/asciidoctor/table.rb +52 -23
  72. data/lib/asciidoctor/version.rb +1 -1
  73. data/man/asciidoctor.1 +8 -8
  74. data/man/asciidoctor.adoc +4 -4
  75. metadata +16 -15
data/README-zh_CN.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.9, 2019-04-30
3
+ v2.0.14, 2021-04-19
4
4
  // settings:
5
5
  :page-layout: base
6
6
  :idprefix:
@@ -18,7 +18,7 @@ ifdef::env-github[]
18
18
  :warning-caption: :warning:
19
19
  endif::[]
20
20
  // Variables:
21
- :release-version: 2.0.9
21
+ :release-version: 2.0.14
22
22
  // URIs:
23
23
  :uri-org: https://github.com/asciidoctor
24
24
  :uri-repo: {uri-org}/asciidoctor
@@ -41,8 +41,8 @@ endif::[]
41
41
  :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
42
42
  :uri-license: {uri-rel-file-base}LICENSE
43
43
  :uri-tests: {uri-rel-tree-base}test
44
- :uri-discuss: http://discuss.asciidoctor.org
45
- :uri-irc: irc://irc.freenode.org/#asciidoctor
44
+ :uri-discuss: https://discuss.asciidoctor.org
45
+ :uri-chat: https://asciidoctor.zulipchat.com
46
46
  :uri-rubygem: https://rubygems.org/gems/asciidoctor
47
47
  :uri-what-is-asciidoc: {uri-docs}/what-is-asciidoc
48
48
  :uri-user-manual: {uri-docs}/user-manual
@@ -62,8 +62,8 @@ endif::[]
62
62
 
63
63
  {uri-project}/[Asciidoctor] 是一个 _快速_ 文本处理器和发布工具链,它可以将 {uri-what-is-asciidoc}[AsciiDoc] 文档转化成 HTML 5、 DocBook 5 以及其他格式。
64
64
  Asciidoctor 由 Ruby 编写,打包成 RubyGem,然后发布到 {uri-rubygem}[RubyGems.org] 上。
65
- 这个 gem 还被包含道几个 Linux 发行版中,其中包括 Fedora、Debian 和 Ubuntu。
66
- Asciidoctor 是开源的,{uri-repo}[代码]托管在 GitHub,遵从 {uri-license}[MIT] 协议。
65
+ 这个 gem 还被包含到几个 Linux 发行版中,其中包括 Fedora、Debian 和 Ubuntu。
66
+ Asciidoctor 是开源的,link:{uri-repo}[代码托管在 GitHub],遵从 {uri-license}[MIT] 协议。
67
67
 
68
68
  该文档有如下语言的翻译版:
69
69
 
@@ -78,6 +78,14 @@ Asciidoctor 是开源的,{uri-repo}[代码]托管在 GitHub,遵从 {uri-lice
78
78
  * {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc 语法快速参考]
79
79
  * {uri-docs}/user-manual[Asciidoctor 用户手册]
80
80
 
81
+ ifdef::status[]
82
+ image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={uri-gem}]
83
+ image:https://img.shields.io/badge/rubydoc.info-{release-version}-blue.svg[library (API) docs,link=https://www.rubydoc.info/gems/asciidoctor/{release-version}]
84
+ image:https://github.com/asciidoctor/asciidoctor/workflows/CI/badge.svg[Build Status (GitHub Actions),link={uri-repo}/actions]
85
+ image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
86
+ image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[project chat,link=https://asciidoctor.zulipchat.com/]
87
+ endif::[]
88
+
81
89
  .Ruby 所至, Asciidoctor 相随
82
90
  ****
83
91
  使用 JRuby 让 Asciidoctor 运行在 Java 虚拟机上。
@@ -89,15 +97,6 @@ Asciidoctor 也可以运行在 JavaScript 上。
89
97
  Asciidoctor.js 被用于预览 AsciiDoc,支持 Chrome 扩展,Atom,Brackets 或其他基于 Web 的工具。
90
98
  ****
91
99
 
92
- ifdef::status[]
93
- .*Project health*
94
- image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI), link=https://travis-ci.org/asciidoctor/asciidoctor]
95
- image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&amp;passingText=green%20bar&amp;failingText=%23fail&amp;pendingText=building%2E%2E%2E[Build Status (AppVeyor), link=https://ci.appveyor.com/project/asciidoctor/asciidoctor]
96
- //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status, link=https://coveralls.io/r/asciidoctor/asciidoctor]
97
- //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate, link="https://codeclimate.com/github/asciidoctor/asciidoctor"]
98
- image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs, link="https://inch-ci.org/github/asciidoctor/asciidoctor"]
99
- endif::[]
100
-
101
100
  [#the-big-picture]
102
101
  == 整体概况
103
102
 
@@ -326,7 +325,7 @@ WARNING: 当你通过 API 使用 Asciidoctor 时,默认的安全模式是 `:se
326
325
  在 secure 模式下,很多核心特性将不可用,包括 `include` 特性。
327
326
  如果你想启用这些特性,你需要明确设置安全模式为 `:server` (推荐)或 `:safe`。
328
327
 
329
- 你也可以将 AsciiDoc 字符串转化我内嵌的 HTML (为了插入到一个 HTML 页面),用法如下:
328
+ 你也可以将 AsciiDoc 字符串转化为可内嵌的 HTML (为了插入到一个 HTML 页面),用法如下:
330
329
 
331
330
  [source]
332
331
  ----
@@ -393,9 +392,9 @@ Asciidoctor 支持自定义转化器,它可以操作从待处理文件到生
393
392
  但是,如果没有反馈,我们将寸步难行。
394
393
  我们鼓励你在讨论组、Twitter或聊天室里,提问为题,讨论项目的方方面面,
395
394
 
395
+ 聊天 (Zulip):: {uri-chat}
396
396
  讨论组 (Nabble):: {uri-discuss}
397
397
  Twitter:: https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] 来加入话题 或 https://twitter.com/asciidoctor[@asciidoctor] at并提醒我们
398
- 聊天 (Gitter):: image:https://badges.gitter.im/Join%20In.svg[Gitter, link=https://gitter.im/asciidoctor/asciidoctor]
399
398
 
400
399
  ifdef::env-github[]
401
400
  Further information and documentation about Asciidoctor can be found on the project's website.
@@ -412,7 +411,7 @@ Asciidoctor 组织在 GitHub 托管代码、议案跟踪和相关子项目。
412
411
  [#copyright-and-licensing]
413
412
  == 版权和协议
414
413
 
415
- Copyright (C) 2012-2019 Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
414
+ Copyright (C) 2012-2021 Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
416
415
  这个软件的免费使用是在MIT许可条款授予的。
417
416
 
418
417
  请看 {uri-license}[版权声明] 文件来获取更多详细信息。
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>; Ryan Waldron <https://github.com/erebor[@erebor]>
3
- v2.0.9, 2019-04-30
3
+ v2.0.14, 2021-04-19
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -17,140 +17,127 @@ ifdef::env-github[]
17
17
  :warning-caption: :warning:
18
18
  endif::[]
19
19
  // Variables:
20
- :release-version: 2.0.9
21
- // URIs:
22
- :uri-org: https://github.com/asciidoctor
23
- :uri-repo: {uri-org}/asciidoctor
24
- :uri-asciidoctorj: {uri-org}/asciidoctorj
25
- :uri-asciidoctorjs: {uri-org}/asciidoctor.js
26
- :uri-gradle-plugin: {uri-org}/asciidoctor-gradle-plugin
27
- :uri-maven-plugin: {uri-org}/asciidoctor-maven-plugin
28
- :uri-asciidoclet: {uri-org}/asciidoclet
29
- :uri-project: https://asciidoctor.org
30
- :uri-gem: https://rubygems.org/gems/asciidoctor
31
- ifdef::env-site[:uri-project: link:]
32
- :uri-docs: {uri-project}/docs
33
- :uri-news: {uri-project}/news
34
- :uri-manpage: {uri-project}/man/asciidoctor
35
- :uri-issues: {uri-repo}/issues
36
- :uri-contributors: {uri-repo}/graphs/contributors
37
- :uri-rel-file-base: link:
38
- :uri-rel-tree-base: link:
20
+ :release-version: 2.0.14
21
+ // URLs:
22
+ :url-org: https://github.com/asciidoctor
23
+ :url-repo: {url-org}/asciidoctor
24
+ :url-asciidoctorj: {url-org}/asciidoctorj
25
+ :url-asciidoctorjs: {url-org}/asciidoctor.js
26
+ :url-gradle-plugin: {url-org}/asciidoctor-gradle-plugin
27
+ :url-maven-plugin: {url-org}/asciidoctor-maven-plugin
28
+ :url-asciidoclet: {url-org}/asciidoclet
29
+ :url-project: https://asciidoctor.org
30
+ ifdef::env-site[:url-project: link:]
31
+ :url-docs: https://docs.asciidoctor.org
32
+ :url-news: {url-project}/news
33
+ :url-manpage: {url-project}/man/asciidoctor
34
+ :url-issues: {url-repo}/issues
35
+ :url-contributors: {url-repo}/graphs/contributors
36
+ :url-rel-file-base: link:
37
+ :url-rel-tree-base: link:
39
38
  ifdef::env-site,env-yard[]
40
- :uri-rel-file-base: {uri-repo}/blob/master/
41
- :uri-rel-tree-base: {uri-repo}/tree/master/
39
+ :url-rel-file-base: {url-repo}/blob/master/
40
+ :url-rel-tree-base: {url-repo}/tree/master/
42
41
  endif::[]
43
- :uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
44
- :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
45
- :uri-license: {uri-rel-file-base}LICENSE
46
- :uri-tests: {uri-rel-tree-base}test
47
- :uri-discuss: http://discuss.asciidoctor.org
48
- :uri-irc: irc://irc.freenode.org/#asciidoctor
49
- :uri-rubygem: https://rubygems.org/gems/asciidoctor
50
- :uri-what-is-asciidoc: {uri-docs}/what-is-asciidoc
51
- :uri-user-manual: {uri-docs}/user-manual
52
- :uri-install-docker: https://github.com/asciidoctor/docker-asciidoctor
53
- //:uri-install-doc: {uri-docs}/install-toolchain
54
- :uri-install-macos-doc: {uri-docs}/install-asciidoctor-macos
55
- :uri-convert-doc: {uri-docs}/convert-documents
56
- :uri-themes-doc: {uri-docs}/produce-custom-themes-using-asciidoctor-stylesheet-factory
57
- :uri-gitscm-repo: https://github.com/git/git-scm.com
58
- :uri-prototype: {uri-gitscm-repo}/commits/master/lib/asciidoc.rb
59
- :uri-freesoftware: https://www.gnu.org/philosophy/free-sw.html
60
- :uri-foundation: https://foundation.zurb.com
61
- :uri-opal: https://opalrb.com
62
- :uri-tilt: https://github.com/rtomayko/tilt
63
- :uri-ruby: https://www.ruby-lang.org
42
+ :url-changelog: {url-rel-file-base}CHANGELOG.adoc
43
+ :url-contribute: {url-rel-file-base}CONTRIBUTING.adoc
44
+ :url-license: {url-rel-file-base}LICENSE
45
+ :url-tests: {url-rel-tree-base}test
46
+ :url-discuss: https://discuss.asciidoctor.org
47
+ :url-chat: https://asciidoctor.zulipchat.com
48
+ :url-rubygem: https://rubygems.org/gems/asciidoctor
49
+ :url-what-is-asciidoc: {url-docs}/asciidoctor/latest/#relationship-to-asciidoc
50
+ :url-install-docker: https://github.com/asciidoctor/docker-asciidoctor
51
+ :url-opal: https://opalrb.com
52
+ :url-tilt: https://github.com/rtomayko/tilt
53
+ :url-ruby: https://www.ruby-lang.org
54
+ //:url-prototype: https://github.com/git/git-scm.com/commits/master/lib/asciidoc.rb This page doesn't exist anymore.
64
55
  // images:
65
- :image-uri-screenshot: https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png
56
+ :image-url-screenshot: https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png
66
57
 
67
- {uri-project}[Asciidoctor] is a _fast_, {uri-license}[open source] text processor and publishing toolchain for converting {uri-what-is-asciidoc}[AsciiDoc] content to HTML5, DocBook, PDF, and other formats.
68
- Asciidoctor is written in Ruby and runs on all major operating systems.
69
- The Asciidoctor project is {uri-repo}[hosted on GitHub].
58
+ {url-project}[Asciidoctor] is a fast, open source, Ruby-based text processor for parsing AsciiDoc(R) into a document model and converting it to output formats such as HTML 5, DocBook 5, manual pages, PDF, EPUB 3, and other formats.
70
59
 
71
- To simplify installation, Asciidoctor is packaged and distributed as a RubyGem (aka gem) to {uri-rubygem}[RubyGems.org].
72
- It's also distributed as a package for popular Linux distributions and macOS.
73
- In addition to running on Ruby, Asciidoctor can be executed on a JVM using {uri-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment (including the browser) using {uri-asciidoctorjs}[Asciidoctor.js].
60
+ Asciidoctor also has an ecosystem of extensions, converters, build plugins, and tools to help you author and publish content written in {url-what-is-asciidoc}[AsciiDoc].
61
+ You can find the documentation for these projects at {url-docs}.
62
+
63
+ In addition to running on Ruby, Asciidoctor can be executed on a JVM using {url-asciidoctorj}[AsciidoctorJ] or in any JavaScript environment using {url-asciidoctorjs}[Asciidoctor.js].
74
64
 
75
65
  ifndef::env-site,env-yard[]
76
66
  This document is also available in the following languages: +
77
- {uri-rel-file-base}README-zh_CN.adoc[汉语]
67
+ {url-rel-file-base}README-zh_CN.adoc[汉语]
78
68
  |
79
- {uri-rel-file-base}README-de.adoc[Deutsch]
69
+ {url-rel-file-base}README-de.adoc[Deutsch]
80
70
  |
81
- {uri-rel-file-base}README-fr.adoc[Français]
71
+ {url-rel-file-base}README-fr.adoc[Français]
82
72
  |
83
- {uri-rel-file-base}README-jp.adoc[日本語]
73
+ {url-rel-file-base}README-jp.adoc[日本語]
84
74
  endif::[]
85
75
 
86
76
  .Key documentation
87
77
  [.compact]
88
- * {uri-docs}/what-is-asciidoc[What is AsciiDoc?]
89
- * {uri-docs}/asciidoc-writers-guide[AsciiDoc Writer's Guide]
90
- * {uri-docs}/user-manual[Asciidoctor User Manual]
91
- * {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc Syntax Reference]
78
+ * {url-docs}/asciidoctor/latest/[Asciidoctor Documentation]
79
+ * {url-docs}/asciidoc/latest/[AsciiDoc Language Documentation]
80
+ * {url-docs}/asciidoc/latest/syntax-quick-reference/[AsciiDoc Syntax Quick Reference]
92
81
 
93
82
  ifdef::status[]
94
- //.*Project health*
95
- image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={uri-gem}]
83
+ image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={url-rubygem}]
96
84
  image:https://img.shields.io/badge/rubydoc.info-{release-version}-blue.svg[library (API) docs,link=https://www.rubydoc.info/gems/asciidoctor/{release-version}]
97
- image:https://img.shields.io/travis/asciidoctor/asciidoctor/master.svg[Build Status (Travis CI),link=https://travis-ci.org/asciidoctor/asciidoctor]
98
- image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&amp;passingText=green%20bar&amp;failingText=%23fail&amp;pendingText=building%2E%2E%2E[Build Status (AppVeyor),link=https://ci.appveyor.com/project/asciidoctor/asciidoctor]
99
- //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Coverage Status,link=https://coveralls.io/r/asciidoctor/asciidoctor]
85
+ image:https://github.com/asciidoctor/asciidoctor/workflows/CI/badge.svg[Build Status (GitHub Actions),link={url-repo}/actions]
86
+ //image:https://img.shields.io/coveralls/asciidoctor/asciidoctor/master.svg[Code Coverage,link=https://coveralls.io/r/asciidoctor/asciidoctor]
100
87
  //image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate,link=https://codeclimate.com/github/asciidoctor/asciidoctor]
101
- image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
88
+ //image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Docs Coverage,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
89
+ image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[Project Chat (Zulip),link={url-chat}]
102
90
  endif::[]
103
91
 
104
92
  == Sponsors
105
93
 
106
- We want to recognize our {uri-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
94
+ We want to recognize our {url-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
107
95
  Thank you sponsors!
108
96
  Without your generous support, Asciidoctor would not be possible.
109
97
 
110
- ifndef::env-site,env-yard[]
111
- Major funding for Asciidoctor is provided by our *Change Maker*, https://opendevise.com[OpenDevise], our *Strategy Sponsors*, https://www.khronos.org/[Khronos Group] and Linda Roberts, and our *Pull Request Backers*, Brian Dominick, Guillaume Grossetie, and Abel Salgado Romero.
112
- Additional funding is provided by the supporters listed on our {uri-project}/supporters[Community Backers] page.
113
- endif::[]
114
-
115
98
  You can support this project by becoming a sponsor through https://opencollective.com/asciidoctor[OpenCollective].
116
99
 
117
- == The Big Picture
100
+ == AsciiDoc Processing and Built-in Converters
118
101
 
119
- Asciidoctor reads content written in plain text, as shown in the panel on the left in the image below, and converts it to HTML5, as shown rendered in the right panel.
120
- Asciidoctor applies a default stylesheet to the HTML5 document to provide a pleasant out-of-the-box experience.
102
+ AsciiDoc is the language. +
103
+ Asciidoctor is the processor.
121
104
 
122
- image::{image-uri-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
105
+ Asciidoctor reads the AsciiDoc source, as shown in the panel on the left in the image below, and converts it to publishable formats, such as HTML 5, as shown rendered in the panel on the right.
123
106
 
124
- == AsciiDoc Processing
107
+ image::{image-url-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
125
108
 
126
- Asciidoctor reads and parses text written in the AsciiDoc syntax, then feeds the parse tree to a set of built-in converters to produce HTML5, DocBook 5, and man(ual) page output.
127
- You have the option of using your own converter or loading {uri-tilt}[Tilt]-supported templates to customize the generated output or produce additional formats.
109
+ Asciidoctor provides built-in {url-docs}/asciidoctor/latest/converters/[converters] for three output formats by default: {url-docs}/asciidoctor/latest/html-backend/[HTML 5], {url-docs}/asciidoctor/latest/docbook-backend/[DocBook 5], and {url-docs}/asciidoctor/latest/manpage-backend/[man page] (short for manual page).
110
+ Additional converters, such as PDF and EPUB 3, are provided by separate gems.
111
+ Asciidoctor also provides an out-of-the-box HTML experience complete with a {url-docs}/asciidoctor/latest/html-backend/default-stylesheet/[default stylesheet] and built-in integrations like Font Awesome (for icons), highlight.js, Rouge, and Pygments (for source highlighting), and MathJax (for STEM processing).
128
112
 
129
- Asciidoctor is a drop-in replacement for its predecessor, AsciiDoc Python (`asciidoc.py`).
130
- The Asciidoctor test suite has {uri-tests}[> 2,350 tests] to ensure compatibility with the AsciiDoc syntax.
113
+ == Asciidoctor Ecosystem
131
114
 
132
- In addition to the classic AsciiDoc syntax, Asciidoctor recognizes additional markup and formatting options, such as font-based icons (e.g., `+icon:fire[]+`) and UI elements (e.g., `+button:[Save]+`).
133
- Asciidoctor also offers a modern, responsive theme based on {uri-foundation}[Foundation] to style the HTML5 output.
115
+ Although Asciidoctor is written in Ruby, it does not mean you need Ruby to use it.
116
+ Asciidoctor can be executed on a JVM using {url-docs}/asciidoctorj/latest/[AsciidoctorJ] or in any JavaScript environment (including the browser) using {url-docs}/asciidoctor.js/latest/[Asciidoctor.js].
134
117
 
135
- == Where Ruby goes, Asciidoctor follows
118
+ Installing an Asciidoctor processor is just the beginning of your publishing experience.
119
+ Asciidoctor gives you access to a ecosystem of extensions and tools, ranging from add-on converters, to extended syntax, to build plugins, to integrated writing and preview environments:
136
120
 
137
- You can run Asciidoctor on the JVM using JRuby.
138
- To invoke the Asciidoctor API directly from Java and other JVM languages, use {uri-asciidoctorj}[AsciidoctorJ].
139
- There are plugins available for {uri-maven-plugin}[Apache Maven], {uri-gradle-plugin}[Gradle], and {uri-asciidoclet}[Javadoc], which allow you to integrate AsciiDoc processing directly into your build using AsciidoctorJ.
121
+ * {url-docs}/diagram-extension/latest/[Asciidoctor Diagram]
122
+ * {url-docs}/maven-tools/latest/[Maven plugin and site module]
123
+ * {url-gradle-plugin}[Gradle plugin]
124
+ * {url-docs}/asciidoclet/latest/[Asciidoclet]
125
+ * {url-docs}/reveal.js-converter/latest/[reveal.js converter]
126
+ * {url-docs}/epub3-converter/latest/[EPUB 3 converter]
127
+ * https://intellij-asciidoc-plugin.ahus1.de/docs[IntelliJ plugin]
128
+ * {url-docs}/asciidoctor/latest/tooling/#web-browser-add-ons-preview-only[web browser extensions]
129
+ * {url-org}[and more]
140
130
 
141
- Asciidoctor also runs in JavaScript.
142
- {uri-opal}[Opal] is used to transcompile the Ruby source to JavaScript to produce {uri-asciidoctorjs}[Asciidoctor.js].
143
- Asciidoctor.js is a fully-functional version of Asciidoctor that works in any JavaScript environment, such as a web browser or Node.js.
144
- It's used to power the AsciiDoc preview extensions for Chrome, Atom, Brackets and other web-based tooling.
131
+ Asciidoctor is the successor to AsciiDoc.py.
132
+ If you're using AsciiDoc.py, see {url-docs}/asciidoctor/latest/migrate/asciidoc-py/[Migrate from AsciiDoc.py] to learn how to upgrade to Asciidoctor.
145
133
 
146
134
  == Requirements
147
135
 
148
- Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {uri-ruby}[Ruby]:
136
+ Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {url-ruby}[Ruby]:
149
137
 
150
- * CRuby (aka MRI) 2.3 - 2.6
138
+ * CRuby (aka MRI) 2.3 - 3.0
151
139
  * JRuby 9.1 - 9.2
152
140
  * TruffleRuby (GraalVM)
153
- * Opal (JavaScript)
154
141
 
155
142
  [CAUTION]
156
143
  ====
@@ -166,11 +153,11 @@ Asciidoctor works best when you use UTF-8 everywhere.
166
153
 
167
154
  == Installation
168
155
 
169
- Asciidoctor can be installed using (a) package managers for popular Linux distributions, (b) Homebrew for macOS, (c) the `gem install` command (recommended for Windows users), (d) the Asciidoctor Docker image, or (e) Bundler.
170
-
171
- The benefit of using your operating system's package manager to install the gem is that it handles installing Ruby and the RubyGems library if those packages are not already installed on your machine.
156
+ Asciidoctor is packaged and distributed to RubyGems.org as a RubyGem (aka gem) named {url-rubygem}[asciidoctor^].
157
+ The asciidoctor gem can be installed on all major operating systems using Ruby packaging tools (gem or bundle).
158
+ Asciidoctor is also distributed as a Docker image, as a package for numerous Linux distributions, and as a package for macOS (via Homebrew).
172
159
 
173
- === (a) Linux package managers
160
+ === Linux package managers
174
161
 
175
162
  The version of Asciidoctor installed by the package manager may not match the latest release of Asciidoctor.
176
163
  Consult the package repository for your distribution to find out which version is packaged per distribution release.
@@ -182,7 +169,7 @@ Consult the package repository for your distribution to find out which version i
182
169
  * https://software.opensuse.org/package/rubygem-asciidoctor[OpenSUSE (rubygem-asciidoctor)]
183
170
  * https://packages.ubuntu.com/search?keywords=asciidoctor[Ubuntu (asciidoctor)]
184
171
 
185
- If you want to use a version of Asciidoctor that is newer than what is installed by the package manager, see the <<gem-install,gem installation instructions>>.
172
+ If you want to use a version of Asciidoctor that's newer than what is installed by the package manager, see the <<gem-install,gem installation instructions>>.
186
173
 
187
174
  ==== apk (Alpine Linux)
188
175
 
@@ -210,7 +197,7 @@ To install the package, open a terminal and type:
210
197
 
211
198
  $ sudo dnf install -y asciidoctor
212
199
 
213
- === (b) Homebrew (macOS)
200
+ === Homebrew (macOS)
214
201
 
215
202
  You can use Homebrew, the macOS package manager, to install Asciidoctor.
216
203
  If you don’t have Homebrew on your computer, complete the installation instructions at https://brew.sh/[brew.sh] first.
@@ -221,9 +208,9 @@ Open a terminal and type:
221
208
 
222
209
  Homebrew installs the `asciidoctor` gem into an exclusive prefix that's independent of system gems.
223
210
 
224
- === (c) Windows
211
+ === Windows
225
212
 
226
- To use Asciidoctor with Windows, you have two easy options.
213
+ To use Asciidoctor with Windows, you have two options.
227
214
 
228
215
  ==== Chocolatey
229
216
 
@@ -241,13 +228,14 @@ Then follow <<gem-install,gem installation instructions>>.
241
228
  Or you use the https://rubyinstaller.org/downloads/[Rubyinstaller], download the package for your Windows Version and after the installation go ahead with <<gem-install,gem installation instructions>>.
242
229
 
243
230
  [#gem-install]
244
- === (d) gem install
231
+ === gem install
245
232
 
246
- Before installing Asciidoctor using `gem install`, you should use https://rvm.io[RVM] to install Ruby in your home directory (i.e., user space).
247
- Then, you can safely use the `gem` command to install or update the Asciidoctor gem.
233
+ Before installing Asciidoctor using `gem install`, you should set up https://rvm.io[RVM] (or similar) to install Ruby in your home directory (i.e., user space).
234
+ Then, you can safely use the `gem` command to install or update the Asciidoctor gem, or any other gem for that matter.
248
235
  When using RVM, gems are installed in a location isolated from the system.
236
+ (You should never use the gem command to install system-wide gems).
249
237
 
250
- Open a terminal and type:
238
+ Once you've installed Ruby using RVM, and you have activated it using `rvm use 3.0`, open a terminal and type:
251
239
 
252
240
  $ gem install asciidoctor
253
241
 
@@ -255,11 +243,11 @@ If you want to install a pre-release version (e.g., a release candidate), use:
255
243
 
256
244
  $ gem install asciidoctor --pre
257
245
 
258
- === (e) Docker
246
+ === Docker
259
247
 
260
- See {uri-install-docker}[Installing Asciidoctor using Docker].
248
+ See {url-install-docker}[Installing Asciidoctor using Docker].
261
249
 
262
- === (f) Bundler
250
+ === Bundler
263
251
 
264
252
  . Create a Gemfile in the root folder of your project (or the current directory)
265
253
  . Add the `asciidoctor` gem to your Gemfile as follows:
@@ -336,9 +324,6 @@ Asciidoctor {release-version} [https://asciidoctor.org]
336
324
  Runtime Environment (ruby 2.6.0p0 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
337
325
  ....
338
326
 
339
- Asciidoctor also provides an API.
340
- The API is intended for integration with other Ruby software, such as Rails, Sinatra and GitHub, and other languages, such as Java (via {uri-asciidoctorj}[AsciidoctorJ]) and JavaScript (via {uri-asciidoctorjs}[Asciidoctor.js]).
341
-
342
327
  === Command line interface (CLI)
343
328
 
344
329
  The `asciidoctor` command allows you to invoke Asciidoctor from the command line (i.e., a terminal).
@@ -356,15 +341,18 @@ For instance, to write the file to a different directory, use:
356
341
 
357
342
  $ asciidoctor -D output README.adoc
358
343
 
359
- The `asciidoctor` {uri-manpage}[man page] provides a complete reference of the command line interface.
344
+ The `asciidoctor` {url-manpage}[man page] provides a complete reference of the command line interface.
360
345
 
361
346
  Refer to the following resources to learn more about how to use the `asciidoctor` command.
362
347
 
363
- * {uri-convert-doc}[How do I convert a document?]
364
- * {uri-themes-doc}[How do I use the Asciidoctor stylesheet factory to produce custom themes?]
348
+ * {url-docs}/asciidoctor/latest/cli/[Process AsciiDoc using the CLI]
349
+ * {url-docs}/asciidoctor/latest/cli/options/[CLI options]
365
350
 
366
351
  === Ruby API
367
352
 
353
+ Asciidoctor also provides an API.
354
+ The API is intended for integration with other Ruby software, such as Rails, GitHub, and GitLab, as well as other languages, such as Java (via AsciidoctorJ) and JavaScript (via Asciidoctor.js).
355
+
368
356
  To use Asciidoctor in your application, you first need to require the gem:
369
357
 
370
358
  [source]
@@ -409,10 +397,14 @@ Keep in mind that if you don't like the output Asciidoctor produces, _you can ch
409
397
  Asciidoctor supports custom converters that can handle converting from the parsed document to the generated output.
410
398
 
411
399
  One easy way to customize the output piecemeal is by using the template converter.
412
- The template converter allows you to supply a {uri-tilt}[Tilt]-supported template file to handle converting any node in the document.
400
+ The template converter allows you to supply a {url-tilt}[Tilt]-supported template file to handle converting any node in the document.
413
401
 
414
402
  However you go about it, you _can_ have 100% control over the output.
415
- For more information about how to use the API or to customize the output, refer to the {uri-user-manual}[user manual].
403
+ For more information about how to use the API or to customize the output, see:
404
+
405
+ * {url-docs}/asciidoctor/latest/api/[Process AsciiDoc using the API]
406
+ * {url-docs}/asciidoctor/latest/api/options/[API options]
407
+ * {url-docs}/asciidoctor/latest/safe-modes/[Safe modes]
416
408
 
417
409
  == Contributing
418
410
 
@@ -431,10 +423,10 @@ Here are some ways *you* can contribute:
431
423
  ** clean up inconsistent whitespace
432
424
  ** write tests!
433
425
  * by refactoring code
434
- * by fixing {uri-issues}[issues]
426
+ * by fixing {url-issues}[issues]
435
427
  * by reviewing patches
436
428
 
437
- The {uri-contribute}[Contributing] guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to the Asciidoctor Project.
429
+ The {url-contribute}[Contributing] guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to Asciidoctor.
438
430
 
439
431
  == Getting Help
440
432
 
@@ -442,35 +434,45 @@ Asciidoctor is developed to help you easily write and publish your content.
442
434
  But we can't do it without your feedback!
443
435
  We encourage you to ask questions and discuss any aspects of the project on the discussion list, on Twitter or in the chat room.
444
436
 
445
- Chat (Gitter):: image:https://badges.gitter.im/Join%20In.svg[Gitter, link=https://gitter.im/asciidoctor/asciidoctor]
446
- Discussion list (Nabble):: {uri-discuss}
447
- Twitter:: https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] hashtag or https://twitter.com/asciidoctor[@asciidoctor] mention
437
+ Chat (Zulip):: {url-chat}
438
+ Discussion list (Nabble):: {url-discuss}
439
+ Twitter:: Follow https://twitter.com/asciidoctor[@asciidoctor] or search for the https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] hashtag
448
440
 
449
441
  ifdef::env-github[]
450
442
  Further information and documentation about Asciidoctor can be found on the project's website.
451
443
 
452
- {uri-project}[Home] | {uri-news}[News] | {uri-docs}[Docs]
444
+ {url-project}[Home] | {url-news}[News] | {url-docs}[Docs]
453
445
  endif::[]
454
446
 
455
447
  The Asciidoctor organization on GitHub hosts the project's source code, issue tracker, and sub-projects.
456
448
 
457
- Source repository (git):: {uri-repo}
458
- Issue tracker:: {uri-issues}
459
- Asciidoctor organization on GitHub:: {uri-org}
449
+ Source repository (git):: {url-repo}
450
+ Issue tracker:: {url-issues}
451
+ Asciidoctor organization on GitHub:: {url-org}
460
452
 
461
- == License
453
+ == Code of Conduct
462
454
 
463
- Copyright (C) 2012-2019 Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
455
+ The core Asciidoctor project is governed by the https://github.com/asciidoctor/.github/blob/main/CODE-OF-CONDUCT.md[Code of Conduct] for the Asciidoctor community of projects.
456
+ By participating, you're agreeing to honor this code.
457
+ Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone.
458
+
459
+ == Copyright and License
460
+
461
+ Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
464
462
  Use of this software is granted under the terms of the MIT License.
465
463
 
466
- See the {uri-license}[LICENSE] for the full license text.
464
+ See the {url-license}[LICENSE] for the full license text.
467
465
 
468
466
  == Authors
469
467
 
470
- *Asciidoctor* is led by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] and has received contributions from {uri-contributors}[many individuals] in Asciidoctor's awesome community.
471
- The project was initiated in 2012 by https://github.com/erebor[Ryan Waldron] and based on {uri-prototype}[a prototype] written by https://github.com/nickh[Nick Hengeveld].
468
+ *Asciidoctor* is led by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] and has received contributions from {url-contributors}[many individuals] in Asciidoctor's awesome community.
469
+ The project was initiated in 2012 by https://github.com/erebor[Ryan Waldron] based on a prototype written by https://github.com/nickh[Nick Hengeveld] for the Git website.
470
+
471
+ *AsciiDoc.py* was started and maintained by Stuart Rackham from https://github.com/asciidoc-py/asciidoc-py2/blob/master/CHANGELOG.txt[2002 to 2013] and has received contributions from many individuals in the https://github.com/asciidoc-py/asciidoc-py2/graphs/contributors[AsciiDoc.py community].
472
+
473
+ == Trademarks
472
474
 
473
- *AsciiDoc* was started by Stuart Rackham and has received contributions from many individuals in the AsciiDoc community.
475
+ AsciiDoc(R) and AsciiDoc Language(TM) are trademarks of the Eclipse Foundation, Inc.
474
476
 
475
477
  ifndef::env-site[]
476
478
  == Changelog
@@ -479,5 +481,5 @@ ifeval::[{safe-mode-level} < 20]
479
481
  include::CHANGELOG.adoc[tag=compact,leveloffset=+1]
480
482
  endif::[]
481
483
 
482
- Refer to the {uri-changelog}[CHANGELOG] for a complete list of changes in older releases.
484
+ Refer to the {url-changelog}[CHANGELOG] for a complete list of changes in older releases.
483
485
  endif::[]