asciidoctor 2.0.10 → 2.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +211 -22
- data/LICENSE +1 -1
- data/README-de.adoc +12 -13
- data/README-fr.adoc +11 -15
- data/README-jp.adoc +9 -17
- data/README-zh_CN.adoc +17 -18
- data/README.adoc +140 -132
- data/asciidoctor.gemspec +6 -6
- data/data/locale/attributes-ar.adoc +4 -3
- data/data/locale/attributes-be.adoc +23 -0
- data/data/locale/attributes-bg.adoc +4 -3
- data/data/locale/attributes-ca.adoc +6 -5
- data/data/locale/attributes-cs.adoc +4 -3
- data/data/locale/attributes-da.adoc +6 -5
- data/data/locale/attributes-de.adoc +4 -4
- data/data/locale/attributes-en.adoc +4 -4
- data/data/locale/attributes-es.adoc +6 -5
- data/data/locale/attributes-fa.adoc +4 -3
- data/data/locale/attributes-fi.adoc +4 -3
- data/data/locale/attributes-fr.adoc +6 -5
- data/data/locale/attributes-hu.adoc +4 -3
- data/data/locale/attributes-id.adoc +4 -3
- data/data/locale/attributes-it.adoc +6 -5
- data/data/locale/attributes-ja.adoc +4 -3
- data/data/locale/{attributes-kr.adoc → attributes-ko.adoc} +4 -3
- data/data/locale/attributes-nb.adoc +4 -3
- data/data/locale/attributes-nl.adoc +6 -5
- data/data/locale/attributes-nn.adoc +4 -3
- data/data/locale/attributes-pl.adoc +8 -7
- data/data/locale/attributes-pt.adoc +6 -5
- data/data/locale/attributes-pt_BR.adoc +6 -5
- data/data/locale/attributes-ro.adoc +4 -3
- data/data/locale/attributes-ru.adoc +6 -5
- data/data/locale/attributes-sr.adoc +4 -4
- data/data/locale/attributes-sr_Latn.adoc +4 -4
- data/data/locale/attributes-sv.adoc +4 -4
- data/data/locale/attributes-tr.adoc +4 -3
- data/data/locale/attributes-uk.adoc +6 -5
- data/data/locale/attributes-zh_CN.adoc +4 -3
- data/data/locale/attributes-zh_TW.adoc +4 -3
- data/data/reference/syntax.adoc +14 -7
- data/data/stylesheets/asciidoctor-default.css +27 -28
- data/lib/asciidoctor.rb +38 -12
- data/lib/asciidoctor/abstract_block.rb +9 -4
- data/lib/asciidoctor/abstract_node.rb +16 -6
- data/lib/asciidoctor/attribute_list.rb +64 -72
- data/lib/asciidoctor/cli/invoker.rb +2 -0
- data/lib/asciidoctor/cli/options.rb +10 -9
- data/lib/asciidoctor/convert.rb +167 -162
- data/lib/asciidoctor/converter.rb +13 -12
- data/lib/asciidoctor/converter/docbook5.rb +29 -12
- data/lib/asciidoctor/converter/html5.rb +69 -46
- data/lib/asciidoctor/converter/manpage.rb +68 -49
- data/lib/asciidoctor/converter/template.rb +3 -0
- data/lib/asciidoctor/document.rb +43 -50
- data/lib/asciidoctor/extensions.rb +2 -4
- data/lib/asciidoctor/helpers.rb +20 -15
- data/lib/asciidoctor/load.rb +102 -101
- data/lib/asciidoctor/parser.rb +40 -32
- data/lib/asciidoctor/path_resolver.rb +14 -12
- data/lib/asciidoctor/reader.rb +22 -13
- data/lib/asciidoctor/rx.rb +7 -6
- data/lib/asciidoctor/substitutors.rb +78 -57
- data/lib/asciidoctor/syntax_highlighter.rb +8 -5
- data/lib/asciidoctor/syntax_highlighter/coderay.rb +1 -1
- data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +12 -4
- data/lib/asciidoctor/syntax_highlighter/prettify.rb +7 -4
- data/lib/asciidoctor/syntax_highlighter/pygments.rb +6 -7
- data/lib/asciidoctor/syntax_highlighter/rouge.rb +33 -19
- data/lib/asciidoctor/table.rb +52 -23
- data/lib/asciidoctor/version.rb +1 -1
- data/man/asciidoctor.1 +8 -8
- data/man/asciidoctor.adoc +4 -4
- metadata +16 -15
data/README-jp.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.
|
3
|
+
v2.0.15, 2021-04-27
|
4
4
|
// settings:
|
5
5
|
:idprefix:
|
6
6
|
:idseparator: -
|
@@ -17,7 +17,7 @@ ifdef::env-github[]
|
|
17
17
|
:warning-caption: :warning:
|
18
18
|
endif::[]
|
19
19
|
// Variables:
|
20
|
-
:release-version: 2.0.
|
20
|
+
:release-version: 2.0.15
|
21
21
|
// URIs:
|
22
22
|
:uri-org: https://github.com/asciidoctor
|
23
23
|
:uri-repo: {uri-org}/asciidoctor
|
@@ -44,8 +44,8 @@ endif::[]
|
|
44
44
|
:uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
|
45
45
|
:uri-license: {uri-rel-file-base}LICENSE
|
46
46
|
:uri-tests: {uri-rel-tree-base}test
|
47
|
-
:uri-discuss:
|
48
|
-
:uri-
|
47
|
+
:uri-discuss: https://discuss.asciidoctor.org
|
48
|
+
:uri-chat: https://asciidoctor.zulipchat.com
|
49
49
|
:uri-rubygem: https://rubygems.org/gems/asciidoctor
|
50
50
|
:uri-what-is-asciidoc: {uri-docs}/what-is-asciidoc
|
51
51
|
:uri-user-manual: {uri-docs}/user-manual
|
@@ -91,14 +91,11 @@ endif::[]
|
|
91
91
|
* {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc Syntax Reference]
|
92
92
|
|
93
93
|
ifdef::status[]
|
94
|
-
//.*Project health*
|
95
94
|
image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={uri-gem}]
|
96
95
|
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://
|
98
|
-
image:https://ci.appveyor.com/api/projects/status/ifplu67oxvgn6ceq/branch/master?svg=true&passingText=green%20bar&failingText=%23fail&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]
|
100
|
-
//image:https://codeclimate.com/github/asciidoctor/asciidoctor/badges/gpa.svg[Code Climate,link=https://codeclimate.com/github/asciidoctor/asciidoctor]
|
96
|
+
image:https://github.com/asciidoctor/asciidoctor/workflows/CI/badge.svg[Build Status (GitHub Actions),link={uri-repo}/actions]
|
101
97
|
image:https://inch-ci.org/github/asciidoctor/asciidoctor.svg?branch=master[Inline docs,link=https://inch-ci.org/github/asciidoctor/asciidoctor]
|
98
|
+
image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[project chat,link=https://asciidoctor.zulipchat.com/]
|
102
99
|
endif::[]
|
103
100
|
|
104
101
|
== スポンサー
|
@@ -107,11 +104,6 @@ endif::[]
|
|
107
104
|
スポンサーのみなさま, ありがとうございます!
|
108
105
|
みなさまの多くのサポートなくしてAsciidoctorは実現不可能です.
|
109
106
|
|
110
|
-
ifndef::env-site,env-yard[]
|
111
|
-
Asciidoctorの主な資金的サポートは, *Change Maker* である https://opendevise.com[OpenDevise], *Strategy Sponsors* である https://www.khronos.org/[Khronos Group] とLinda Roberts, そして *Pull Request Backers* である Brian Dominick, Guillaume Grossetie, Abel Salgado Romero によって提供されています.
|
112
|
-
さらに, {uri-project}/supporters[Community Backers] のページに掲載されているサポーターによって追加的な資金が提供されています.
|
113
|
-
endif::[]
|
114
|
-
|
115
107
|
https://opencollective.com/asciidoctor[OpenCollective] を通じてスポンサーになることにより, このプロジェクトを支援することができます.
|
116
108
|
|
117
109
|
== 全体像
|
@@ -278,7 +270,7 @@ gem 'asciidoctor'
|
|
278
270
|
$ bundle
|
279
271
|
|
280
272
|
gemをアップグレードするには, Gemfileで新バージョンを指定し, `bundle` を再び実行してください.
|
281
|
-
`bundle update` を(gemを指定せずに)行うことは推奨 *されません* . 他のgemもアップデートされて思わぬ結果になるかもしれないためです.
|
273
|
+
`bundle update` を(gemを指定せずに)行うことは推奨 *されません* . 他のgemもアップデートされて思わぬ結果になるかもしれないためです.
|
282
274
|
|
283
275
|
== アップグレード
|
284
276
|
|
@@ -442,7 +434,7 @@ Asciidoctorは, コンテンツの執筆と公開を簡単にするために開
|
|
442
434
|
しかしあなたからのフィードバックがなくてはAsciidoctorの開発は進みません!
|
443
435
|
ディスカッションリスト, Twitter, チャットルームを使って, 質問をしたりプロジェクトのさまざまな側面について話し合ったりすることをお勧めします.
|
444
436
|
|
445
|
-
チャット(
|
437
|
+
チャット(Zulip):: {uri-chat}
|
446
438
|
ディスカッションリスト(Nabble):: {uri-discuss}
|
447
439
|
Twitter:: ハッシュタグ https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] またはメンション https://twitter.com/asciidoctor[@asciidoctor]
|
448
440
|
|
@@ -460,7 +452,7 @@ GitHub上のAsciidoctorのorganization:: {uri-org}
|
|
460
452
|
|
461
453
|
== ライセンス
|
462
454
|
|
463
|
-
Copyright (C) 2012-
|
455
|
+
Copyright (C) 2012-2021 Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
|
464
456
|
本ソフトウェアはMITライセンスのもとで使用できます.
|
465
457
|
|
466
458
|
ライセンスの詳細については {uri-license}[LICENSE] ファイルを参照してください.
|
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.
|
3
|
+
v2.0.15, 2021-04-27
|
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.
|
21
|
+
:release-version: 2.0.15
|
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:
|
45
|
-
:uri-
|
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
|
66
|
-
Asciidoctor 是开源的,{uri-repo}[
|
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&passingText=green%20bar&failingText=%23fail&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
|
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-
|
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.
|
3
|
+
v2.0.15, 2021-04-27
|
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.
|
21
|
-
//
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:uri-rel-tree-base: link:
|
20
|
+
:release-version: 2.0.15
|
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
|
-
:
|
41
|
-
:
|
39
|
+
:url-rel-file-base: {url-repo}/blob/master/
|
40
|
+
:url-rel-tree-base: {url-repo}/tree/master/
|
42
41
|
endif::[]
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
53
|
-
|
54
|
-
:
|
55
|
-
|
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-
|
56
|
+
:image-url-screenshot: https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/screenshot.png
|
66
57
|
|
67
|
-
{
|
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
|
-
|
72
|
-
|
73
|
-
|
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
|
-
{
|
67
|
+
{url-rel-file-base}README-zh_CN.adoc[汉语]
|
78
68
|
|
|
79
|
-
{
|
69
|
+
{url-rel-file-base}README-de.adoc[Deutsch]
|
80
70
|
|
|
81
|
-
{
|
71
|
+
{url-rel-file-base}README-fr.adoc[Français]
|
82
72
|
|
|
83
|
-
{
|
73
|
+
{url-rel-file-base}README-jp.adoc[日本語]
|
84
74
|
endif::[]
|
85
75
|
|
86
76
|
.Key documentation
|
87
77
|
[.compact]
|
88
|
-
* {
|
89
|
-
* {
|
90
|
-
* {
|
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
|
-
|
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://
|
98
|
-
image:https://
|
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[
|
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 {
|
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
|
-
==
|
100
|
+
== AsciiDoc Processing and Built-in Converters
|
118
101
|
|
119
|
-
|
120
|
-
Asciidoctor
|
102
|
+
AsciiDoc is the language. +
|
103
|
+
Asciidoctor is the processor.
|
121
104
|
|
122
|
-
|
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
|
-
|
107
|
+
image::{image-url-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
|
125
108
|
|
126
|
-
Asciidoctor
|
127
|
-
|
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
|
130
|
-
The Asciidoctor test suite has {uri-tests}[> 2,350 tests] to ensure compatibility with the AsciiDoc syntax.
|
113
|
+
== Asciidoctor Ecosystem
|
131
114
|
|
132
|
-
|
133
|
-
Asciidoctor
|
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
|
-
|
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
|
-
|
138
|
-
|
139
|
-
|
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
|
142
|
-
{
|
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 {
|
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 -
|
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
|
170
|
-
|
171
|
-
|
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
|
-
===
|
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
|
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
|
-
===
|
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
|
-
===
|
211
|
+
=== Windows
|
225
212
|
|
226
|
-
To use Asciidoctor with Windows, you have two
|
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
|
-
===
|
231
|
+
=== gem install
|
245
232
|
|
246
|
-
Before installing Asciidoctor using `gem install`, you should
|
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
|
-
|
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
|
-
===
|
246
|
+
=== Docker
|
259
247
|
|
260
|
-
See {
|
248
|
+
See {url-install-docker}[Installing Asciidoctor using Docker].
|
261
249
|
|
262
|
-
===
|
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:
|
@@ -333,12 +321,9 @@ You should see information about the Asciidoctor version and your Ruby environme
|
|
333
321
|
[.output,subs=attributes+]
|
334
322
|
....
|
335
323
|
Asciidoctor {release-version} [https://asciidoctor.org]
|
336
|
-
Runtime Environment (ruby
|
324
|
+
Runtime Environment (ruby 3.0.1p64 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 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` {
|
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
|
-
* {
|
364
|
-
* {
|
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 {
|
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,
|
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 {
|
426
|
+
* by fixing {url-issues}[issues]
|
435
427
|
* by reviewing patches
|
436
428
|
|
437
|
-
The {
|
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,51 @@ 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 (
|
446
|
-
Discussion list (Nabble):: {
|
447
|
-
Twitter:: https://twitter.com/
|
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
|
-
{
|
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):: {
|
458
|
-
Issue tracker:: {
|
459
|
-
Asciidoctor organization on GitHub:: {
|
449
|
+
Source repository (git):: {url-repo}
|
450
|
+
Issue tracker:: {url-issues}
|
451
|
+
Asciidoctor organization on GitHub:: {url-org}
|
452
|
+
|
453
|
+
== Code of Conduct
|
454
|
+
|
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.
|
460
458
|
|
461
|
-
==
|
459
|
+
== Versioning and Release Policy
|
462
460
|
|
463
|
-
|
461
|
+
This project adheres to semantic versioning (*major.minor.patch*).
|
462
|
+
Typically, patch releases are only made for the current minor release.
|
463
|
+
However, exceptions are made on a case-by-case basis to address security vulnerabilities and other high-priority issues.
|
464
|
+
|
465
|
+
== Copyright and License
|
466
|
+
|
467
|
+
Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
|
464
468
|
Use of this software is granted under the terms of the MIT License.
|
465
469
|
|
466
|
-
See the {
|
470
|
+
See the {url-license}[LICENSE] for the full license text.
|
467
471
|
|
468
472
|
== Authors
|
469
473
|
|
470
|
-
*Asciidoctor* is led by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] and has received contributions from {
|
471
|
-
The project was initiated in 2012 by https://github.com/erebor[Ryan Waldron]
|
474
|
+
*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.
|
475
|
+
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.
|
476
|
+
|
477
|
+
*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].
|
478
|
+
|
479
|
+
== Trademarks
|
472
480
|
|
473
|
-
|
481
|
+
AsciiDoc(R) and AsciiDoc Language(TM) are trademarks of the Eclipse Foundation, Inc.
|
474
482
|
|
475
483
|
ifndef::env-site[]
|
476
484
|
== Changelog
|
@@ -479,5 +487,5 @@ ifeval::[{safe-mode-level} < 20]
|
|
479
487
|
include::CHANGELOG.adoc[tag=compact,leveloffset=+1]
|
480
488
|
endif::[]
|
481
489
|
|
482
|
-
Refer to the {
|
490
|
+
Refer to the {url-changelog}[CHANGELOG] for a complete list of changes in older releases.
|
483
491
|
endif::[]
|