asciidoctor 2.0.10 → 2.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +294 -30
- data/LICENSE +1 -1
- data/README-de.adoc +16 -20
- data/README-fr.adoc +15 -22
- data/README-jp.adoc +15 -26
- data/README-zh_CN.adoc +21 -25
- data/README.adoc +161 -138
- data/asciidoctor.gemspec +6 -13
- 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 +8 -7
- 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-th.adoc +23 -0
- data/data/locale/attributes-tr.adoc +4 -3
- data/data/locale/attributes-uk.adoc +6 -5
- data/data/locale/attributes-vi.adoc +23 -0
- 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 +76 -76
- data/data/stylesheets/coderay-asciidoctor.css +9 -9
- data/lib/asciidoctor/abstract_block.rb +20 -13
- data/lib/asciidoctor/abstract_node.rb +23 -12
- data/lib/asciidoctor/attribute_list.rb +64 -72
- data/lib/asciidoctor/block.rb +6 -6
- data/lib/asciidoctor/cli/invoker.rb +3 -2
- data/lib/asciidoctor/cli/options.rb +32 -31
- data/lib/asciidoctor/convert.rb +168 -162
- data/lib/asciidoctor/converter/docbook5.rb +49 -34
- data/lib/asciidoctor/converter/html5.rb +180 -139
- data/lib/asciidoctor/converter/manpage.rb +118 -90
- data/lib/asciidoctor/converter/template.rb +15 -13
- data/lib/asciidoctor/converter.rb +19 -16
- data/lib/asciidoctor/core_ext/hash/merge.rb +1 -1
- data/lib/asciidoctor/document.rb +77 -86
- data/lib/asciidoctor/extensions.rb +22 -16
- data/lib/asciidoctor/helpers.rb +20 -15
- data/lib/asciidoctor/list.rb +2 -6
- data/lib/asciidoctor/load.rb +103 -101
- data/lib/asciidoctor/logging.rb +10 -8
- data/lib/asciidoctor/parser.rb +211 -220
- data/lib/asciidoctor/path_resolver.rb +17 -15
- data/lib/asciidoctor/reader.rb +87 -79
- data/lib/asciidoctor/rx.rb +9 -7
- data/lib/asciidoctor/section.rb +7 -0
- data/lib/asciidoctor/substitutors.rb +167 -148
- data/lib/asciidoctor/syntax_highlighter/coderay.rb +3 -2
- data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +13 -5
- data/lib/asciidoctor/syntax_highlighter/prettify.rb +7 -4
- data/lib/asciidoctor/syntax_highlighter/pygments.rb +19 -11
- data/lib/asciidoctor/syntax_highlighter/rouge.rb +35 -20
- data/lib/asciidoctor/syntax_highlighter.rb +16 -16
- data/lib/asciidoctor/table.rb +70 -43
- data/lib/asciidoctor/timings.rb +3 -3
- data/lib/asciidoctor/version.rb +1 -1
- data/lib/asciidoctor.rb +45 -19
- data/man/asciidoctor.1 +29 -31
- data/man/asciidoctor.adoc +35 -29
- metadata +17 -70
data/README.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Asciidoctor
|
2
|
-
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]
|
3
|
-
v2.0.
|
2
|
+
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
|
3
|
+
v2.0.17, 2022-01-05
|
4
4
|
// settings:
|
5
5
|
:idprefix:
|
6
6
|
:idseparator: -
|
@@ -9,7 +9,6 @@ v2.0.10, 2019-05-31
|
|
9
9
|
ifndef::env-github[:icons: font]
|
10
10
|
ifdef::env-github[]
|
11
11
|
:status:
|
12
|
-
:outfilesuffix: .adoc
|
13
12
|
:caution-caption: :fire:
|
14
13
|
:important-caption: :exclamation:
|
15
14
|
:note-caption: :paperclip:
|
@@ -17,140 +16,123 @@ ifdef::env-github[]
|
|
17
16
|
:warning-caption: :warning:
|
18
17
|
endif::[]
|
19
18
|
// 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:
|
19
|
+
:release-version: 2.0.17
|
20
|
+
// URLs:
|
21
|
+
:url-org: https://github.com/asciidoctor
|
22
|
+
:url-repo: {url-org}/asciidoctor
|
23
|
+
:url-asciidoctorj: {url-org}/asciidoctorj
|
24
|
+
:url-asciidoctorjs: {url-org}/asciidoctor.js
|
25
|
+
:url-gradle-plugin: {url-org}/asciidoctor-gradle-plugin
|
26
|
+
:url-maven-plugin: {url-org}/asciidoctor-maven-plugin
|
27
|
+
:url-asciidoclet: {url-org}/asciidoclet
|
28
|
+
:url-project: https://asciidoctor.org
|
29
|
+
ifdef::env-site[:url-project: link:]
|
30
|
+
:url-docs: https://docs.asciidoctor.org
|
31
|
+
:url-news: {url-project}/news
|
32
|
+
:url-manpage: {url-project}/man/asciidoctor
|
33
|
+
:url-issues: {url-repo}/issues
|
34
|
+
:url-contributors: {url-repo}/graphs/contributors
|
35
|
+
:url-rel-file-base: link:
|
36
|
+
:url-rel-tree-base: link:
|
39
37
|
ifdef::env-site,env-yard[]
|
40
|
-
:
|
41
|
-
:
|
38
|
+
:url-rel-file-base: {url-repo}/blob/HEAD/
|
39
|
+
:url-rel-tree-base: {url-repo}/tree/HEAD/
|
42
40
|
endif::[]
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
51
|
-
:
|
52
|
-
:
|
53
|
-
|
54
|
-
:
|
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
|
41
|
+
:url-changelog: {url-rel-file-base}CHANGELOG.adoc
|
42
|
+
:url-contribute: {url-rel-file-base}CONTRIBUTING.adoc
|
43
|
+
:url-license: {url-rel-file-base}LICENSE
|
44
|
+
:url-tests: {url-rel-tree-base}test
|
45
|
+
:url-discuss: https://discuss.asciidoctor.org
|
46
|
+
:url-chat: https://asciidoctor.zulipchat.com
|
47
|
+
:url-rubygem: https://rubygems.org/gems/asciidoctor
|
48
|
+
:url-what-is-asciidoc: {url-docs}/asciidoctor/latest/#relationship-to-asciidoc
|
49
|
+
:url-install-docker: https://github.com/asciidoctor/docker-asciidoctor
|
50
|
+
:url-opal: https://opalrb.com
|
51
|
+
:url-tilt: https://github.com/rtomayko/tilt
|
52
|
+
:url-ruby: https://www.ruby-lang.org
|
64
53
|
// images:
|
65
|
-
:image-
|
54
|
+
:image-url-screenshot: https://cdn.jsdelivr.net/gh/asciidoctor/asciidoctor/screenshot.png
|
66
55
|
|
67
|
-
{
|
68
|
-
Asciidoctor is written in Ruby and runs on all major operating systems.
|
69
|
-
The Asciidoctor project is {uri-repo}[hosted on GitHub].
|
56
|
+
{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
57
|
|
71
|
-
|
72
|
-
|
73
|
-
|
58
|
+
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].
|
59
|
+
You can find the documentation for these projects at {url-docs}.
|
60
|
+
|
61
|
+
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
62
|
|
75
63
|
ifndef::env-site,env-yard[]
|
76
64
|
This document is also available in the following languages: +
|
77
|
-
{
|
65
|
+
{url-rel-file-base}README-zh_CN.adoc[汉语]
|
78
66
|
|
|
79
|
-
{
|
67
|
+
{url-rel-file-base}README-de.adoc[Deutsch]
|
80
68
|
|
|
81
|
-
{
|
69
|
+
{url-rel-file-base}README-fr.adoc[Français]
|
82
70
|
|
|
83
|
-
{
|
71
|
+
{url-rel-file-base}README-jp.adoc[日本語]
|
84
72
|
endif::[]
|
85
73
|
|
86
74
|
.Key documentation
|
87
75
|
[.compact]
|
88
|
-
* {
|
89
|
-
* {
|
90
|
-
* {
|
91
|
-
* {uri-docs}/asciidoc-syntax-quick-reference[AsciiDoc Syntax Reference]
|
76
|
+
* {url-docs}/asciidoctor/latest/[Asciidoctor Documentation]
|
77
|
+
* {url-docs}/asciidoc/latest/[AsciiDoc Language Documentation]
|
78
|
+
* {url-docs}/asciidoc/latest/syntax-quick-reference/[AsciiDoc Syntax Quick Reference]
|
92
79
|
|
93
80
|
ifdef::status[]
|
94
|
-
|
95
|
-
image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={uri-gem}]
|
81
|
+
image:https://img.shields.io/gem/v/asciidoctor.svg[Latest Release, link={url-rubygem}]
|
96
82
|
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]
|
100
|
-
//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]
|
83
|
+
image:https://github.com/asciidoctor/asciidoctor/workflows/CI/badge.svg[Build Status (GitHub Actions),link={url-repo}/actions]
|
84
|
+
image:https://img.shields.io/badge/zulip-join_chat-brightgreen.svg[Project Chat (Zulip),link={url-chat}]
|
102
85
|
endif::[]
|
103
86
|
|
104
87
|
== Sponsors
|
105
88
|
|
106
|
-
We want to recognize our {
|
89
|
+
We want to recognize our {url-project}/supporters[sponsors] for their commitment to improving the state of technical documentation by supporting this project.
|
107
90
|
Thank you sponsors!
|
108
91
|
Without your generous support, Asciidoctor would not be possible.
|
109
92
|
|
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
93
|
You can support this project by becoming a sponsor through https://opencollective.com/asciidoctor[OpenCollective].
|
116
94
|
|
117
|
-
==
|
95
|
+
== AsciiDoc Processing and Built-in Converters
|
118
96
|
|
119
|
-
|
120
|
-
Asciidoctor
|
97
|
+
AsciiDoc is the language. +
|
98
|
+
Asciidoctor is the processor.
|
121
99
|
|
122
|
-
|
100
|
+
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
101
|
|
124
|
-
|
102
|
+
image::{image-url-screenshot}[Preview of AsciiDoc source and corresponding rendered HTML]
|
125
103
|
|
126
|
-
Asciidoctor
|
127
|
-
|
104
|
+
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).
|
105
|
+
Additional converters, such as PDF and EPUB 3, are provided by separate gems.
|
106
|
+
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
107
|
|
129
|
-
Asciidoctor
|
130
|
-
The Asciidoctor test suite has {uri-tests}[> 2,350 tests] to ensure compatibility with the AsciiDoc syntax.
|
108
|
+
== Asciidoctor Ecosystem
|
131
109
|
|
132
|
-
|
133
|
-
Asciidoctor
|
110
|
+
Although Asciidoctor is written in Ruby, it does not mean you need Ruby to use it.
|
111
|
+
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
112
|
|
135
|
-
|
113
|
+
Installing an Asciidoctor processor is just the beginning of your publishing experience.
|
114
|
+
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
115
|
|
137
|
-
|
138
|
-
|
139
|
-
|
116
|
+
* {url-docs}/diagram-extension/latest/[Asciidoctor Diagram]
|
117
|
+
* {url-docs}/maven-tools/latest/[Maven plugin and site module]
|
118
|
+
* {url-gradle-plugin}[Gradle plugin]
|
119
|
+
* {url-docs}/asciidoclet/latest/[Asciidoclet]
|
120
|
+
* {url-docs}/reveal.js-converter/latest/[reveal.js converter]
|
121
|
+
* {url-docs}/epub3-converter/latest/[EPUB 3 converter]
|
122
|
+
* https://intellij-asciidoc-plugin.ahus1.de/docs[IntelliJ plugin]
|
123
|
+
* {url-docs}/asciidoctor/latest/tooling/#web-browser-add-ons-preview-only[web browser extensions]
|
124
|
+
* {url-org}[and more]
|
140
125
|
|
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.
|
126
|
+
Asciidoctor is the successor to AsciiDoc.py.
|
127
|
+
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
128
|
|
146
129
|
== Requirements
|
147
130
|
|
148
|
-
Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {
|
131
|
+
Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {url-ruby}[Ruby]:
|
149
132
|
|
150
|
-
* CRuby (aka MRI) 2.3 -
|
133
|
+
* CRuby (aka MRI) 2.3 - 3.0
|
151
134
|
* JRuby 9.1 - 9.2
|
152
135
|
* TruffleRuby (GraalVM)
|
153
|
-
* Opal (JavaScript)
|
154
136
|
|
155
137
|
[CAUTION]
|
156
138
|
====
|
@@ -166,11 +148,11 @@ Asciidoctor works best when you use UTF-8 everywhere.
|
|
166
148
|
|
167
149
|
== Installation
|
168
150
|
|
169
|
-
Asciidoctor
|
151
|
+
Asciidoctor is packaged and distributed to RubyGems.org as a RubyGem (aka gem) named {url-rubygem}[asciidoctor^].
|
152
|
+
The asciidoctor gem can be installed on all major operating systems using Ruby packaging tools (gem or bundle).
|
153
|
+
Asciidoctor is also distributed as a Docker image, as a package for numerous Linux distributions, and as a package for macOS (via Homebrew and MacPorts).
|
170
154
|
|
171
|
-
|
172
|
-
|
173
|
-
=== (a) Linux package managers
|
155
|
+
=== Linux package managers
|
174
156
|
|
175
157
|
The version of Asciidoctor installed by the package manager may not match the latest release of Asciidoctor.
|
176
158
|
Consult the package repository for your distribution to find out which version is packaged per distribution release.
|
@@ -182,7 +164,7 @@ Consult the package repository for your distribution to find out which version i
|
|
182
164
|
* https://software.opensuse.org/package/rubygem-asciidoctor[OpenSUSE (rubygem-asciidoctor)]
|
183
165
|
* https://packages.ubuntu.com/search?keywords=asciidoctor[Ubuntu (asciidoctor)]
|
184
166
|
|
185
|
-
If you want to use a version of Asciidoctor that
|
167
|
+
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
168
|
|
187
169
|
==== apk (Alpine Linux)
|
188
170
|
|
@@ -210,20 +192,33 @@ To install the package, open a terminal and type:
|
|
210
192
|
|
211
193
|
$ sudo dnf install -y asciidoctor
|
212
194
|
|
213
|
-
===
|
195
|
+
=== macOS
|
196
|
+
|
197
|
+
==== Homebrew
|
214
198
|
|
215
|
-
You can use Homebrew, the macOS package manager, to install Asciidoctor.
|
216
|
-
If you don
|
217
|
-
|
199
|
+
You can use https://brew.sh[Homebrew], the macOS package manager, to install Asciidoctor.
|
200
|
+
If you don't have Homebrew on your computer, complete the https://brew.sh[installation instructions] first.
|
201
|
+
|
202
|
+
Once Homebrew is installed, you're ready to install the `asciidoctor` gem.
|
218
203
|
Open a terminal and type:
|
219
204
|
|
220
205
|
$ brew install asciidoctor
|
221
206
|
|
222
207
|
Homebrew installs the `asciidoctor` gem into an exclusive prefix that's independent of system gems.
|
223
208
|
|
224
|
-
|
209
|
+
==== MacPorts
|
225
210
|
|
226
|
-
|
211
|
+
You can also use https://www.macports.org[MacPorts], another package manager for macOS, to install Asciidoctor.
|
212
|
+
If you don't have MacPorts on your computer, complete the https://www.macports.org/install.php[installation instructions] first.
|
213
|
+
|
214
|
+
Once MacPorts is installed, you're ready to install the `asciidoctor` gem via the https://ports.macports.org/port/asciidoctor/[Asciidoctor port].
|
215
|
+
Open a terminal and type:
|
216
|
+
|
217
|
+
$ sudo port install asciidoctor
|
218
|
+
|
219
|
+
=== Windows
|
220
|
+
|
221
|
+
To use Asciidoctor with Windows, you have two options.
|
227
222
|
|
228
223
|
==== Chocolatey
|
229
224
|
|
@@ -241,13 +236,14 @@ Then follow <<gem-install,gem installation instructions>>.
|
|
241
236
|
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
237
|
|
243
238
|
[#gem-install]
|
244
|
-
===
|
239
|
+
=== gem install
|
245
240
|
|
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.
|
241
|
+
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).
|
242
|
+
Then, you can safely use the `gem` command to install or update the Asciidoctor gem, or any other gem for that matter.
|
248
243
|
When using RVM, gems are installed in a location isolated from the system.
|
244
|
+
(You should never use the gem command to install system-wide gems).
|
249
245
|
|
250
|
-
|
246
|
+
Once you've installed Ruby using RVM, and you have activated it using `rvm use 3.0`, open a terminal and type:
|
251
247
|
|
252
248
|
$ gem install asciidoctor
|
253
249
|
|
@@ -255,11 +251,11 @@ If you want to install a pre-release version (e.g., a release candidate), use:
|
|
255
251
|
|
256
252
|
$ gem install asciidoctor --pre
|
257
253
|
|
258
|
-
===
|
254
|
+
=== Docker
|
259
255
|
|
260
|
-
See {
|
256
|
+
See {url-install-docker}[Installing Asciidoctor using Docker].
|
261
257
|
|
262
|
-
===
|
258
|
+
=== Bundler
|
263
259
|
|
264
260
|
. Create a Gemfile in the root folder of your project (or the current directory)
|
265
261
|
. Add the `asciidoctor` gem to your Gemfile as follows:
|
@@ -309,6 +305,13 @@ To upgrade the gem, use:
|
|
309
305
|
$ brew update
|
310
306
|
$ brew upgrade asciidoctor
|
311
307
|
|
308
|
+
=== MacPorts (macOS)
|
309
|
+
|
310
|
+
To upgrade the gem, use:
|
311
|
+
|
312
|
+
$ sudo port selfupdate
|
313
|
+
$ sudo port upgrade asciidoctor
|
314
|
+
|
312
315
|
=== gem install
|
313
316
|
|
314
317
|
If you previously installed Asciidoctor using the `gem` command, you'll need to manually upgrade Asciidoctor when a new version is released.
|
@@ -333,12 +336,9 @@ You should see information about the Asciidoctor version and your Ruby environme
|
|
333
336
|
[.output,subs=attributes+]
|
334
337
|
....
|
335
338
|
Asciidoctor {release-version} [https://asciidoctor.org]
|
336
|
-
Runtime Environment (ruby
|
339
|
+
Runtime Environment (ruby 3.0.1p64 [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
|
337
340
|
....
|
338
341
|
|
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
342
|
=== Command line interface (CLI)
|
343
343
|
|
344
344
|
The `asciidoctor` command allows you to invoke Asciidoctor from the command line (i.e., a terminal).
|
@@ -356,15 +356,18 @@ For instance, to write the file to a different directory, use:
|
|
356
356
|
|
357
357
|
$ asciidoctor -D output README.adoc
|
358
358
|
|
359
|
-
The `asciidoctor` {
|
359
|
+
The `asciidoctor` {url-manpage}[man page] provides a complete reference of the command line interface.
|
360
360
|
|
361
361
|
Refer to the following resources to learn more about how to use the `asciidoctor` command.
|
362
362
|
|
363
|
-
* {
|
364
|
-
* {
|
363
|
+
* {url-docs}/asciidoctor/latest/cli/[Process AsciiDoc using the CLI]
|
364
|
+
* {url-docs}/asciidoctor/latest/cli/options/[CLI options]
|
365
365
|
|
366
366
|
=== Ruby API
|
367
367
|
|
368
|
+
Asciidoctor also provides an API.
|
369
|
+
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).
|
370
|
+
|
368
371
|
To use Asciidoctor in your application, you first need to require the gem:
|
369
372
|
|
370
373
|
[source]
|
@@ -409,10 +412,14 @@ Keep in mind that if you don't like the output Asciidoctor produces, _you can ch
|
|
409
412
|
Asciidoctor supports custom converters that can handle converting from the parsed document to the generated output.
|
410
413
|
|
411
414
|
One easy way to customize the output piecemeal is by using the template converter.
|
412
|
-
The template converter allows you to supply a {
|
415
|
+
The template converter allows you to supply a {url-tilt}[Tilt]-supported template file to handle converting any node in the document.
|
413
416
|
|
414
417
|
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,
|
418
|
+
For more information about how to use the API or to customize the output, see:
|
419
|
+
|
420
|
+
* {url-docs}/asciidoctor/latest/api/[Process AsciiDoc using the API]
|
421
|
+
* {url-docs}/asciidoctor/latest/api/options/[API options]
|
422
|
+
* {url-docs}/asciidoctor/latest/safe-modes/[Safe modes]
|
416
423
|
|
417
424
|
== Contributing
|
418
425
|
|
@@ -431,10 +438,10 @@ Here are some ways *you* can contribute:
|
|
431
438
|
** clean up inconsistent whitespace
|
432
439
|
** write tests!
|
433
440
|
* by refactoring code
|
434
|
-
* by fixing {
|
441
|
+
* by fixing {url-issues}[issues]
|
435
442
|
* by reviewing patches
|
436
443
|
|
437
|
-
The {
|
444
|
+
The {url-contribute}[Contributing] guide provides information on how to create, style, and submit issues, feature requests, code, and documentation to Asciidoctor.
|
438
445
|
|
439
446
|
== Getting Help
|
440
447
|
|
@@ -442,35 +449,51 @@ Asciidoctor is developed to help you easily write and publish your content.
|
|
442
449
|
But we can't do it without your feedback!
|
443
450
|
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
451
|
|
445
|
-
Chat (
|
446
|
-
Discussion list (Nabble):: {
|
447
|
-
Twitter:: https://twitter.com/
|
452
|
+
Chat (Zulip):: {url-chat}
|
453
|
+
Discussion list (Nabble):: {url-discuss}
|
454
|
+
Twitter:: Follow https://twitter.com/asciidoctor[@asciidoctor] or search for the https://twitter.com/search?f=tweets&q=%23asciidoctor[#asciidoctor] hashtag
|
448
455
|
|
449
456
|
ifdef::env-github[]
|
450
457
|
Further information and documentation about Asciidoctor can be found on the project's website.
|
451
458
|
|
452
|
-
{
|
459
|
+
{url-project}[Home] | {url-news}[News] | {url-docs}[Docs]
|
453
460
|
endif::[]
|
454
461
|
|
455
462
|
The Asciidoctor organization on GitHub hosts the project's source code, issue tracker, and sub-projects.
|
456
463
|
|
457
|
-
Source repository (git):: {
|
458
|
-
Issue tracker:: {
|
459
|
-
Asciidoctor organization on GitHub:: {
|
464
|
+
Source repository (git):: {url-repo}
|
465
|
+
Issue tracker:: {url-issues}
|
466
|
+
Asciidoctor organization on GitHub:: {url-org}
|
467
|
+
|
468
|
+
== Code of Conduct
|
469
|
+
|
470
|
+
The core Asciidoctor project is governed by the https://github.com/asciidoctor/.github/blob/HEAD/CODE-OF-CONDUCT.md[Code of Conduct] for the Asciidoctor community of projects.
|
471
|
+
By participating, you're agreeing to honor this code.
|
472
|
+
Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone.
|
473
|
+
|
474
|
+
== Versioning and Release Policy
|
460
475
|
|
461
|
-
|
476
|
+
This project adheres to semantic versioning (*major.minor.patch*).
|
477
|
+
Typically, patch releases are only made for the current minor release.
|
478
|
+
However, exceptions are made on a case-by-case basis to address security vulnerabilities and other high-priority issues.
|
462
479
|
|
463
|
-
Copyright
|
480
|
+
== Copyright and License
|
481
|
+
|
482
|
+
Copyright (C) 2012-present Dan Allen, Sarah White, Ryan Waldron, and the individual contributors to Asciidoctor.
|
464
483
|
Use of this software is granted under the terms of the MIT License.
|
465
484
|
|
466
|
-
See the {
|
485
|
+
See the {url-license}[LICENSE] for the full license text.
|
467
486
|
|
468
487
|
== Authors
|
469
488
|
|
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]
|
489
|
+
*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.
|
490
|
+
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.
|
491
|
+
|
492
|
+
*AsciiDoc.py* was started and maintained by Stuart Rackham from https://github.com/asciidoc-py/asciidoc-py2/blob/HEAD/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].
|
493
|
+
|
494
|
+
== Trademarks
|
472
495
|
|
473
|
-
|
496
|
+
AsciiDoc(R) and AsciiDoc Language(TM) are trademarks of the Eclipse Foundation, Inc.
|
474
497
|
|
475
498
|
ifndef::env-site[]
|
476
499
|
== Changelog
|
@@ -479,5 +502,5 @@ ifeval::[{safe-mode-level} < 20]
|
|
479
502
|
include::CHANGELOG.adoc[tag=compact,leveloffset=+1]
|
480
503
|
endif::[]
|
481
504
|
|
482
|
-
Refer to the {
|
505
|
+
Refer to the {url-changelog}[CHANGELOG] for a complete list of changes in older releases.
|
483
506
|
endif::[]
|
data/asciidoctor.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
#s.required_ruby_version = '>= 2.3.0'
|
18
18
|
s.metadata = {
|
19
19
|
'bug_tracker_uri' => 'https://github.com/asciidoctor/asciidoctor/issues',
|
20
|
-
'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/
|
20
|
+
'changelog_uri' => 'https://github.com/asciidoctor/asciidoctor/blob/HEAD/CHANGELOG.adoc',
|
21
21
|
'mailing_list_uri' => 'http://discuss.asciidoctor.org',
|
22
22
|
'source_code_uri' => 'https://github.com/asciidoctor/asciidoctor'
|
23
23
|
}
|
@@ -33,22 +33,15 @@ Gem::Specification.new do |s|
|
|
33
33
|
s.require_paths = ['lib']
|
34
34
|
#s.test_files = files.grep %r/^(?:features|test)\/.+$/
|
35
35
|
|
36
|
-
# asciimath is needed for testing AsciiMath in DocBook backend
|
37
|
-
s.add_development_dependency 'asciimath', '~> 1.0.0'
|
38
|
-
# coderay is needed for testing syntax highlighting
|
39
|
-
s.add_development_dependency 'coderay', '~> 1.1.0'
|
40
36
|
# concurrent-ruby, haml, slim, and tilt are needed for testing custom templates
|
41
37
|
s.add_development_dependency 'concurrent-ruby', '~> 1.1.0'
|
42
38
|
s.add_development_dependency 'cucumber', '~> 3.1.0'
|
43
|
-
#
|
44
|
-
s.add_development_dependency '
|
45
|
-
s.add_development_dependency 'haml', '~> 5.
|
46
|
-
s.add_development_dependency 'minitest', '~> 5.
|
39
|
+
# erubi is needed for testing alternate eRuby impls
|
40
|
+
s.add_development_dependency 'erubi', '~> 1.10.0'
|
41
|
+
s.add_development_dependency 'haml', '~> 5.2.0'
|
42
|
+
s.add_development_dependency 'minitest', '~> 5.14.0'
|
47
43
|
s.add_development_dependency 'nokogiri', '~> 1.10.0'
|
48
44
|
s.add_development_dependency 'rake', '~> 12.3.0'
|
49
|
-
|
50
|
-
s.add_development_dependency 'rouge', '~> 3.3.0'
|
51
|
-
s.add_development_dependency 'rspec-expectations', '~> 3.8.0'
|
52
|
-
s.add_development_dependency 'slim', '~> 4.0.0'
|
45
|
+
s.add_development_dependency 'slim', '~> 4.1.0'
|
53
46
|
s.add_development_dependency 'tilt', '~> 2.0.0'
|
54
47
|
end
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: ملحق
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: تنبيه
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: مثال
|
8
8
|
:figure-caption: الشكل
|
9
9
|
:important-caption: مهم
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: قائمة]
|
12
12
|
ifdef::manname-title[:manname-title: اسم]
|
13
13
|
:note-caption: ملاحظة
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: تمهيد]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: جدول
|
@@ -0,0 +1,23 @@
|
|
1
|
+
// Belarusian translation, courtesy of Dexter Morganov <dexter.morganov@gmail.com>
|
2
|
+
:appendix-caption: Дадатак
|
3
|
+
:appendix-refsig: {appendix-caption}
|
4
|
+
:caution-caption: Увага
|
5
|
+
:chapter-signifier: Глава
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
|
+
:example-caption: Прыклад
|
8
|
+
:figure-caption: Малюнак
|
9
|
+
:important-caption: Важна
|
10
|
+
:last-update-label: Апошняе абнаўленне
|
11
|
+
ifdef::listing-caption[:listing-caption: Лістынг]
|
12
|
+
ifdef::manname-title[:manname-title: Назва]
|
13
|
+
:note-caption: Заўвага
|
14
|
+
:part-signifier: Частка
|
15
|
+
:part-refsig: {part-signifier}
|
16
|
+
ifdef::preface-title[:preface-title: Прадмова]
|
17
|
+
:section-refsig: Раздзел
|
18
|
+
:table-caption: Табліца
|
19
|
+
:tip-caption: Падказка
|
20
|
+
:toc-title: Змест
|
21
|
+
:untitled-label: Без назвы
|
22
|
+
:version-label: Версія
|
23
|
+
:warning-caption: Папярэджанне
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Приложение
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Внимание
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Пример
|
8
8
|
:figure-caption: Фигура
|
9
9
|
:important-caption: Важно
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Листинг]
|
12
12
|
ifdef::manname-title[:manname-title: Име]
|
13
13
|
:note-caption: Забележка
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Предговор]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: Таблица
|
@@ -1,9 +1,9 @@
|
|
1
1
|
// Catalan translation, courtesy of Abel Salgado Romero <abelromero@gmail.com> and Alex Soto
|
2
|
-
:appendix-caption:
|
2
|
+
:appendix-caption: Apèndix
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Atenció
|
5
|
-
|
6
|
-
|
5
|
+
:chapter-signifier: Capítol
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Exemple
|
8
8
|
:figure-caption: Figura
|
9
9
|
:important-caption: Important
|
@@ -11,9 +11,10 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Llista]
|
12
12
|
ifdef::manname-title[:manname-title: Nom]
|
13
13
|
:note-caption: Nota
|
14
|
-
|
14
|
+
:part-signifier: Part
|
15
|
+
:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Prefaci]
|
16
|
-
|
17
|
+
:section-refsig: Secció
|
17
18
|
:table-caption: Taula
|
18
19
|
:tip-caption: Suggeriment
|
19
20
|
:toc-title: Índex
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Příloha
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Upozornění
|
5
|
-
:chapter-
|
6
|
-
:chapter-refsig: {chapter-
|
5
|
+
:chapter-signifier: Kapitola
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Příklad
|
8
8
|
:figure-caption: Obrázek
|
9
9
|
:important-caption: Důležité
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Seznam]
|
12
12
|
ifdef::manname-title[:manname-title: Název]
|
13
13
|
:note-caption: Poznámka
|
14
|
-
:part-
|
14
|
+
:part-signifier: Část
|
15
|
+
:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Úvod]
|
16
17
|
:section-refsig: Oddíl
|
17
18
|
:table-caption: Tabulka
|