From 678cf53f38a14d611958f80bc78aed2f202dd661 Mon Sep 17 00:00:00 2001 From: Sarah White Date: Mon, 16 Nov 2020 17:52:15 -0700 Subject: set up documentation component and import Asciidoctor user manual --- docs/asciidoctor/antora.yml | 34 ++ docs/asciidoctor/modules/ROOT/nav-docinfo.adoc | 3 + docs/asciidoctor/modules/ROOT/nav-errors.adoc | 1 + docs/asciidoctor/modules/ROOT/nav-get-started.adoc | 4 + docs/asciidoctor/modules/ROOT/nav-lang.adoc | 1 + docs/asciidoctor/modules/ROOT/nav-project.adoc | 4 + docs/asciidoctor/modules/ROOT/nav-safe-modes.adoc | 2 + docs/asciidoctor/modules/ROOT/nav-top.adoc | 2 + .../ROOT/pages/attributes-and-safe-modes.adoc | 46 +++ .../modules/ROOT/pages/convert-asciidoc-file.adoc | 50 +++ .../asciidoctor/modules/ROOT/pages/converters.adoc | 103 ++++++ .../modules/ROOT/pages/core-concepts.adoc | 19 + docs/asciidoctor/modules/ROOT/pages/docinfo.adoc | 255 +++++++++++++ .../modules/ROOT/pages/errors-and-warnings.adoc | 262 ++++++++++++++ docs/asciidoctor/modules/ROOT/pages/features.adoc | 67 ++++ docs/asciidoctor/modules/ROOT/pages/index.adoc | 46 +++ .../modules/ROOT/pages/language-support.adoc | 159 ++++++++ .../ROOT/pages/project/license-and-authors.adoc | 41 +++ .../ROOT/pages/project/release-schedule.adoc | 77 ++++ .../asciidoctor/modules/ROOT/pages/safe-modes.adoc | 83 +++++ docs/asciidoctor/modules/ROOT/pages/whats-new.adoc | 401 +++++++++++++++++++++ docs/asciidoctor/modules/api/nav.adoc | 6 + .../asciidoctor/modules/api/pages/api-options.adoc | 165 +++++++++ .../modules/api/pages/convert-strings.adoc | 89 +++++ .../modules/api/pages/generate-html-toc.adoc | 33 ++ .../modules/api/pages/load-templates.adoc | 24 ++ docs/asciidoctor/modules/api/pages/overview.adoc | 50 +++ .../modules/api/pages/set-safe-mode.adoc | 18 + .../modules/backends/examples/manpage.adoc | 42 +++ .../backends/examples/mysample-data-uri.adoc | 17 + .../modules/backends/examples/mysample-link.adoc | 13 + .../backends/examples/mysample-stylesdir-link.adoc | 15 + .../backends/examples/mysample-stylesdir.adoc | 14 + .../backends/examples/mysample-stylesheet.adoc | 13 + .../modules/backends/examples/mysample.adoc | 12 + .../modules/backends/examples/wrap.adoc | 17 + docs/asciidoctor/modules/backends/nav.adoc | 12 + .../backends/pages/docbook/convert-to-docbook.adoc | 78 ++++ .../pages/html/apply-code-stylesheets.adoc | 27 ++ .../backends/pages/html/apply-stylesheet.adoc | 97 +++++ .../backends/pages/html/convert-to-html.adoc | 78 ++++ .../backends/pages/html/create-stylesheet.adoc | 35 ++ .../modules/backends/pages/html/favicon.adoc | 48 +++ .../modules/backends/pages/html/front-matter.adoc | 30 ++ .../modules/backends/pages/html/manage-images.adoc | 24 ++ .../backends/pages/html/manage-stylesheets.adoc | 42 +++ .../modules/backends/pages/html/wrap.adoc | 38 ++ .../pages/manpage/convert-to-man-page.adoc | 113 ++++++ docs/asciidoctor/modules/cli/nav.adoc | 6 + .../cli/pages/cli-options-and-parameters.adoc | 138 +++++++ docs/asciidoctor/modules/cli/pages/cli.adoc | 30 ++ docs/asciidoctor/modules/cli/pages/io-piping.adoc | 45 +++ .../asciidoctor/modules/cli/pages/output-file.adoc | 39 ++ .../modules/cli/pages/process-multiple-files.adoc | 48 +++ .../modules/cli/pages/set-safe-mode.adoc | 18 + docs/asciidoctor/modules/extensions/nav.adoc | 10 + .../extensions/pages/block-macro-processor.adoc | 48 +++ .../modules/extensions/pages/block-processor.adoc | 45 +++ .../extensions/pages/compound-block-processor.adoc | 56 +++ .../extensions/pages/docinfo-processor.adoc | 36 ++ .../extensions/pages/include-processor.adoc | 49 +++ .../extensions/pages/inline-macro-processor.adoc | 48 +++ .../modules/extensions/pages/postprocessor.adoc | 33 ++ .../modules/extensions/pages/preprocessor.adoc | 66 ++++ .../modules/extensions/pages/register.adoc | 102 ++++++ .../modules/extensions/pages/tree-processor.adoc | 83 +++++ docs/asciidoctor/modules/install/nav.adoc | 8 + docs/asciidoctor/modules/install/pages/gem.adoc | 42 +++ .../asciidoctor/modules/install/pages/install.adoc | 35 ++ docs/asciidoctor/modules/install/pages/linux.adoc | 57 +++ docs/asciidoctor/modules/install/pages/macos.adoc | 14 + .../modules/install/pages/supported-platforms.adoc | 45 +++ .../install/pages/upgrade-requirements.adoc | 171 +++++++++ .../asciidoctor/modules/install/pages/upgrade.adoc | 59 +++ .../asciidoctor/modules/install/pages/windows.adoc | 18 + .../modules/install/partials/success.adoc | 12 + .../modules/install/partials/upgrade-on-macos.adoc | 4 + docs/asciidoctor/modules/integrations/nav.adoc | 9 + .../modules/integrations/pages/asciimath-gem.adoc | 39 ++ .../modules/integrations/pages/coderay.adoc | 107 ++++++ .../modules/integrations/pages/highlightjs.adoc | 42 +++ .../modules/integrations/pages/mathjax.adoc | 7 + .../modules/integrations/pages/pygments.adoc | 145 ++++++++ .../modules/integrations/pages/rouge.adoc | 70 ++++ .../modules/integrations/pages/stem.adoc | 15 + .../integrations/pages/syntax-highlighters.adoc | 26 ++ .../modules/migrate/examples/convert.groovy | 43 +++ docs/asciidoctor/modules/migrate/nav.adoc | 6 + .../modules/migrate/pages/asciidoc-python.adoc | 368 +++++++++++++++++++ .../modules/migrate/pages/confluence-xhtml.adoc | 29 ++ .../modules/migrate/pages/docbook-xml.adoc | 19 + .../modules/migrate/pages/markdown.adoc | 6 + .../asciidoctor/modules/migrate/pages/ms-word.adoc | 196 ++++++++++ docs/asciidoctor/modules/tooling/nav.adoc | 1 + docs/asciidoctor/modules/tooling/pages/index.adoc | 74 ++++ 95 files changed, 5377 insertions(+) create mode 100644 docs/asciidoctor/antora.yml create mode 100644 docs/asciidoctor/modules/ROOT/nav-docinfo.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-errors.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-get-started.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-lang.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-project.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-safe-modes.adoc create mode 100644 docs/asciidoctor/modules/ROOT/nav-top.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/attributes-and-safe-modes.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/convert-asciidoc-file.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/converters.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/core-concepts.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/docinfo.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/errors-and-warnings.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/features.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/index.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/language-support.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/project/license-and-authors.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/project/release-schedule.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/safe-modes.adoc create mode 100644 docs/asciidoctor/modules/ROOT/pages/whats-new.adoc create mode 100644 docs/asciidoctor/modules/api/nav.adoc create mode 100644 docs/asciidoctor/modules/api/pages/api-options.adoc create mode 100644 docs/asciidoctor/modules/api/pages/convert-strings.adoc create mode 100644 docs/asciidoctor/modules/api/pages/generate-html-toc.adoc create mode 100644 docs/asciidoctor/modules/api/pages/load-templates.adoc create mode 100644 docs/asciidoctor/modules/api/pages/overview.adoc create mode 100644 docs/asciidoctor/modules/api/pages/set-safe-mode.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/manpage.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample-data-uri.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample-link.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample-stylesdir-link.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample-stylesdir.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample-stylesheet.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/mysample.adoc create mode 100644 docs/asciidoctor/modules/backends/examples/wrap.adoc create mode 100644 docs/asciidoctor/modules/backends/nav.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/docbook/convert-to-docbook.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/apply-code-stylesheets.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/apply-stylesheet.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/convert-to-html.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/create-stylesheet.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/favicon.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/front-matter.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/manage-images.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/manage-stylesheets.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/html/wrap.adoc create mode 100644 docs/asciidoctor/modules/backends/pages/manpage/convert-to-man-page.adoc create mode 100644 docs/asciidoctor/modules/cli/nav.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/cli-options-and-parameters.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/cli.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/io-piping.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/output-file.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/process-multiple-files.adoc create mode 100644 docs/asciidoctor/modules/cli/pages/set-safe-mode.adoc create mode 100644 docs/asciidoctor/modules/extensions/nav.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/block-macro-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/block-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/compound-block-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/docinfo-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/include-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/inline-macro-processor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/postprocessor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/preprocessor.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/register.adoc create mode 100644 docs/asciidoctor/modules/extensions/pages/tree-processor.adoc create mode 100644 docs/asciidoctor/modules/install/nav.adoc create mode 100644 docs/asciidoctor/modules/install/pages/gem.adoc create mode 100644 docs/asciidoctor/modules/install/pages/install.adoc create mode 100644 docs/asciidoctor/modules/install/pages/linux.adoc create mode 100644 docs/asciidoctor/modules/install/pages/macos.adoc create mode 100644 docs/asciidoctor/modules/install/pages/supported-platforms.adoc create mode 100644 docs/asciidoctor/modules/install/pages/upgrade-requirements.adoc create mode 100644 docs/asciidoctor/modules/install/pages/upgrade.adoc create mode 100644 docs/asciidoctor/modules/install/pages/windows.adoc create mode 100644 docs/asciidoctor/modules/install/partials/success.adoc create mode 100644 docs/asciidoctor/modules/install/partials/upgrade-on-macos.adoc create mode 100644 docs/asciidoctor/modules/integrations/nav.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/asciimath-gem.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/coderay.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/highlightjs.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/mathjax.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/pygments.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/rouge.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/stem.adoc create mode 100644 docs/asciidoctor/modules/integrations/pages/syntax-highlighters.adoc create mode 100644 docs/asciidoctor/modules/migrate/examples/convert.groovy create mode 100644 docs/asciidoctor/modules/migrate/nav.adoc create mode 100644 docs/asciidoctor/modules/migrate/pages/asciidoc-python.adoc create mode 100644 docs/asciidoctor/modules/migrate/pages/confluence-xhtml.adoc create mode 100644 docs/asciidoctor/modules/migrate/pages/docbook-xml.adoc create mode 100644 docs/asciidoctor/modules/migrate/pages/markdown.adoc create mode 100644 docs/asciidoctor/modules/migrate/pages/ms-word.adoc create mode 100644 docs/asciidoctor/modules/tooling/nav.adoc create mode 100644 docs/asciidoctor/modules/tooling/pages/index.adoc (limited to 'docs') diff --git a/docs/asciidoctor/antora.yml b/docs/asciidoctor/antora.yml new file mode 100644 index 00000000..56398b25 --- /dev/null +++ b/docs/asciidoctor/antora.yml @@ -0,0 +1,34 @@ +name: asciidoctor +title: Asciidoctor +version: '2.0' +asciidoc: + attributes: + xrefstyle: short@ + listing-caption: Example@ + release-version: '2.0.12' + ruby-description: 'ruby 2.7.0p0 [x86_64-linux]' + ruby-short: '2.7' + url-ruby: https://www.ruby-lang.org + url-rubygem: https://rubygems.org/gems + url-rvm: https://rvm.io + url-foundation: https://foundation.zurb.com + url-jruby: https://jruby.org + url-asciidoctorj: https://github.com/asciidoctor/asciidoctorj + url-gradle-plugin: https://github.com/asciidoctor/asciidoctor-gradle-plugin + url-maven-plugin: https://github.com/asciidoctor/asciidoctor-maven-plugin +nav: +- modules/ROOT/nav-top.adoc +- modules/install/nav.adoc +- modules/ROOT/nav-get-started.adoc +- modules/backends/nav.adoc +- modules/cli/nav.adoc +- modules/api/nav.adoc +- modules/ROOT/nav-safe-modes.adoc +- modules/ROOT/nav-docinfo.adoc +- modules/tooling/nav.adoc +- modules/integrations/nav.adoc +- modules/extensions/nav.adoc +- modules/ROOT/nav-lang.adoc +- modules/ROOT/nav-errors.adoc +- modules/migrate/nav.adoc +- modules/ROOT/nav-project.adoc diff --git a/docs/asciidoctor/modules/ROOT/nav-docinfo.adoc b/docs/asciidoctor/modules/ROOT/nav-docinfo.adoc new file mode 100644 index 00000000..dd0e50db --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-docinfo.adoc @@ -0,0 +1,3 @@ +* xref:docinfo.adoc[] +//** Adding Header Content +//** Adding Footer Content diff --git a/docs/asciidoctor/modules/ROOT/nav-errors.adoc b/docs/asciidoctor/modules/ROOT/nav-errors.adoc new file mode 100644 index 00000000..5c15a194 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-errors.adoc @@ -0,0 +1 @@ +* xref:errors-and-warnings.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/nav-get-started.adoc b/docs/asciidoctor/modules/ROOT/nav-get-started.adoc new file mode 100644 index 00000000..827304ad --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-get-started.adoc @@ -0,0 +1,4 @@ +* Get Started with Asciidoctor +** xref:convert-asciidoc-file.adoc[] +** xref:core-concepts.adoc[] +** xref:converters.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/nav-lang.adoc b/docs/asciidoctor/modules/ROOT/nav-lang.adoc new file mode 100644 index 00000000..278dbd67 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-lang.adoc @@ -0,0 +1 @@ +* xref:language-support.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/nav-project.adoc b/docs/asciidoctor/modules/ROOT/nav-project.adoc new file mode 100644 index 00000000..579b3efd --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-project.adoc @@ -0,0 +1,4 @@ +* About Asciidoctor +//.Asciidoctor Project and Community +** xref:project/release-schedule.adoc[] +** xref:project/license-and-authors.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/nav-safe-modes.adoc b/docs/asciidoctor/modules/ROOT/nav-safe-modes.adoc new file mode 100644 index 00000000..be07ed4d --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-safe-modes.adoc @@ -0,0 +1,2 @@ +* xref:safe-modes.adoc[] +** xref:attributes-and-safe-modes.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/nav-top.adoc b/docs/asciidoctor/modules/ROOT/nav-top.adoc new file mode 100644 index 00000000..626f552c --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/nav-top.adoc @@ -0,0 +1,2 @@ +* xref:whats-new.adoc[] +* xref:features.adoc[] diff --git a/docs/asciidoctor/modules/ROOT/pages/attributes-and-safe-modes.adoc b/docs/asciidoctor/modules/ROOT/pages/attributes-and-safe-modes.adoc new file mode 100644 index 00000000..4d28d210 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/pages/attributes-and-safe-modes.adoc @@ -0,0 +1,46 @@ += Manage Attributes By Safe Mode +// anchor: set-safe-attrs + +Asciidoctor provides security levels that control the read and write access of attributes, the include directive, macros, and scripts while a document is processing. +Each level includes the restrictions enabled in the prior security level. + +Asciidoctor provides access to the xref:safe-modes.adoc[current safe mode] through built-in attributes. +You can use these attributes to enable or disable content based on the current safe mode of the processor. + +The safe mode can be referenced by one of the following attributes: + +* The value of the `safe-mode-name` attribute (e.g., unsafe, safe, etc.) +* The value of the `safe-mode-level` attribute (e.g., 0, 10, etc.) +* The presence of the `safe-mode-` attribute, where `` is the safe mode name. + +The attributes in the next example define replacement text for features that are disabled in high security environments: + +[source,asciidoc] +---- +\ifdef::safe-mode-secure[] +Link to chapters instead of including them. +\endif::safe-mode-secure[] +---- + +This feature is particularly handy for displaying content on GitHub, where the safe mode is set to its most restrictive setting, secure. + +You can set the xref:cli:set-safe-mode.adoc[safe mode from the CLI] and the xref:api:set-safe-mode.adoc[API]. + +//// +Allow the include directive to import a file from a URI. + +Example: + + include::https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/README.adoc[] + +To be secure by default, the allow-uri-read attribute must be set in the API or CLI (not document) for this feature to be enabled. It's also completely disabled if the safe mode is SECURE or greater. +Since this is a potentially dangerous feature, it’s disabled if the safe mode is SECURE or greater. Assuming the safe mode is less than SECURE, you must also set the allow-uri-read attribute to permit Asciidoctor to read content from a URI. + +I decided the following defaults for the header_footer option make the most sense: + +true if using the cli (use -s to disable, consistent with asciidoc) +false if using the API, unless converting directly to a file, in which case true is the default +The basic logic is that if you are writing to a file, you probably want to create a standalone document. If you are converting to a string, then you probably want an embedded document. Of course, you can always set it explicitly, this is just a default setting. + +The reason I think the header_footer default is important is because we don't want people switching from Markdown to AsciiDoc and be totally taken by surprise when they start getting a full HTML document. On the other hand, if you are converting to a file (or using the cli), then it makes a lot of sense to write a standalone document. To me, it just feels natural now. +//// diff --git a/docs/asciidoctor/modules/ROOT/pages/convert-asciidoc-file.adoc b/docs/asciidoctor/modules/ROOT/pages/convert-asciidoc-file.adoc new file mode 100644 index 00000000..89b0bee1 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/pages/convert-asciidoc-file.adoc @@ -0,0 +1,50 @@ += Convert Your First AsciiDoc File +:navtitle: Convert Your First File + +Assumptions: + +- [x] You've installed Asciidoctor. +- [x] You've confirmed that the Asciidoctor command line interface (CLI) is available on your PATH. + +On this page, you'll learn how to run Asciidoctor on an AsciiDoc document and convert it to HTML. + +== Generate HTML using the default converter + +Let's generate HTML 5 using Asciidoctor's default converter and stylesheet from an AsciiDoc document. +If you want to follow along with the examples, #download the _my-sample.adoc_ file# or use your own AsciiDoc document. + +. Open a terminal and switch (`cd`) into the directory where your AsciiDoc document is saved. + + $ cd directory-name + +. Call Asciidoctor with the `asciidoctor` command, followed by file name of the AsciiDoc document. +Since HTML 5 is Asciidoctor's default output, we don't need to specify a converter. ++ +-- + $ asciidoctor my-sample.adoc + +As long as the document didn't contain any syntax errors, you won't see any messages printed to your terminal. +-- + +. Type `ls` to list the files in the directory. ++ +-- + $ ls + my-sample.adoc my-sample.html + +You should see a new file named [.path]_my-sample.html_. +Asciidoctor derives the name of the output file from the name of the input document. +-- + +. Open [.path]_my-sample.html_ in your web browser. +The converted document should look like the example below. ++ +==== +#fix ex# +//image::mysample.png[] +==== ++ +The document's text, titles, and link is styled by the default Asciidoctor stylesheet, which is embedded in the HTML output. +As a result, you could save [.path]_my-sample.html_ to any computer and it will look the same. + +TIP: Most of the examples in the general documentation use the CLI, but there are usually corresponding API examples under Working with the API. diff --git a/docs/asciidoctor/modules/ROOT/pages/converters.adoc b/docs/asciidoctor/modules/ROOT/pages/converters.adoc new file mode 100644 index 00000000..30a16af3 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/pages/converters.adoc @@ -0,0 +1,103 @@ += Choose a Converter + +Asciidoctor provides several built-in converters and the ability to add on other converters. +In addition to generating traditional articles and books from AsciiDoc documents, you can also use Asciidoctor to create HTML-based slide decks, static websites, and documentation sites. +When using these web publishing converters, you may need to add some additional structure rules to a document. +However, nothing in this structure restricts you from still being able to publish the content as a normal document too. + +Converter:: Generates a specific output format from AsciiDoc. +Each converter is mapped to a name that you specify using the `-b` (`--backend`) command line option or `backend` API option. + +== Built-in converters + +These built-in converters are bundled with Asciidoctor. + +HTML:: +The HTML 5 converter (`html` or `html5`) generates HTML 5 styled with CSS3. +This is the converter Asciidoctor uses by default. + +xref:backends:html/convert-to-html.adoc#xhtml[XHTML]:: +The XHTML variant (`xhtml` or `xhtml5`) of the HTML 5 converter. + +xref:backends:docbook/convert-to-docbook.adoc[DocBook]:: +The DocBook 5.0 converter (`docbook` or `docbook5`) generates DocBook 5.0 XML. + +xref:backends:manpage/convert-to-man-page.adoc[Man page]:: +The man page converter (`manpage`) generates manual pages for software used on Unix and Unix-like operating systems. + +== Document and book converters + +You can use add-on converters, which plug into Asciidoctor by adding the appropriate library to the runtime path (e.g., `-r asciidoctor-pdf`). + +PDF:: +The PDF converter (`pdf`) generates a portable document format. +Requires the https://rubygems.org/gems/asciidoctor-pdf[asciidoctor-pdf^] gem. + +EPUB3:: +The EPUB3 converter (`epub3`) generates a distribution and interchange format standard for digital publications and documents. +Requires the https://rubygems.org/gems/asciidoctor-epub3[asciidoctor-epub3^] gem. + +//// +LaTeX:: +The LaTeX, a document preparation system for high-quality typesetting. +Requires the https://rubygems.org/gems/asciidoctor-latex[asciidoctor-latex^] gem. + +mallard:: +Mallard 1.0 XML. +Requires the https://github.com/asciidoctor/asciidoctor-mallard[asciidoctor-mallard^] gem (not yet released). +//// + +== HTML slide deck converters + +Reveal.js:: +The Reveal.js converter generates a Reveal.js presentation from an AsciiDoc document. +Requires https://github.com/asciidoctor/asciidoctor-reveal.js[Asciidoctor Reveal.js^]. + +Bespoke:: +The Bespoke converter generates a Bespoke presentation from an AsciiDoc document. +Requires https://github.com/asciidoctor/asciidoctor-bespoke[Asciidoctor Bespoke^]. + +//// +=== Static site generators + +* Jekyll +* Middleman +* Antora +//// + +== Next + +* Learn how to use the xref:cli:cli.adoc[Asciidoctor command line interface]. +* xref:convert-asciidoc-file.adoc[Convert your first AsciiDoc file to HTML] using the default converter. + +// TODO describe the role of template converters (e.g., asciidoctor-backends) + +//// +Pulled directly from the user manual - need to decide where this information goes and how it should be presented. + +== PDFs + +Conversion from AsciiDoc to PDF is made possible by a number of tools. + +{uri-asciidoctor-pdf}[Asciidoctor PDF]:: +A native PDF converter for Asciidoctor (converts directly from AsciiDoc to PDF using Prawn). ++ +Instructions for installing and using Asciidoctor PDF are documented in the project's {uri-asciidoctor-pdf-readme}[README]. +The tool provides built-in theming via a YAML configuration file, which is documented in the {uri-asciidoctor-pdf-theming-guide}[theming guide]. ++ +TIP: Asciidoctor PDF is the preferred tool for converting to PDF and is fully supported by the Asciidoctor community. + +a2x:: +A DocBook toolchain frontend provided by that AsciiDoc Python project. ++ +To use this tool, you should first convert to DocBook using Asciidoctor, then convert the DocBook to PDF using a2x. +a2x accepts a DocBook file as input and can convert it to a PDF using either Apache FOP or dblatex. +Instructions for using a2x are documented in the project's {uri-a2x-manpage}[man page]. + +{fopub-ref}[asciidoctor-fopub]:: +A DocBook toolchain frontend similar to a2x, but which only requires Java to be installed on your machine. ++ +Instructions for using asciidoctor-fopub are documented in the project's {fopub-doc-ref}[README]. +To alter the look and feel of the PDF, it's necessary to pass XSL parameters or modify the XSLT. +More information about customization can be found in http://www.sagehill.net/docbookxsl/[DocBook XSL: The Complete Guide]. +//// diff --git a/docs/asciidoctor/modules/ROOT/pages/core-concepts.adoc b/docs/asciidoctor/modules/ROOT/pages/core-concepts.adoc new file mode 100644 index 00000000..fb72e356 --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/pages/core-concepts.adoc @@ -0,0 +1,19 @@ += Core Concepts + +Asciidoctor parses AsciiDoc documents and then uses a converter to generate the output format of your choice, such as HTML, DocBook, or PDF. +During this process, Asciidoctor applies its default stylesheet or the stylesheet you provide. + +== What's a converter? + +A converter takes AsciiDoc and transforms it into another format. +Each converter produces a specific output format, such as HTML or DocBook XML. + +Asciidoctor comes with built-in HTML, DocBook, and manual page (man page) converters. +You can also plug in EPUB, PDF, LaTeX, HTML slide deck, and static website converters. +See xref:converters.adoc[] for descriptions of all of the supported converters. + +== What's the default stylesheet? + +Asciidoctor comes with a stylesheet that's applied to the output of the built-in converters. +This stylesheet is applied by default unless you tell Asciidoctor to use another stylesheet. +See xref:backends:html/apply-stylesheet.adoc[] to learn about the default and custom stylesheet options. diff --git a/docs/asciidoctor/modules/ROOT/pages/docinfo.adoc b/docs/asciidoctor/modules/ROOT/pages/docinfo.adoc new file mode 100644 index 00000000..2c2cc28c --- /dev/null +++ b/docs/asciidoctor/modules/ROOT/pages/docinfo.adoc @@ -0,0 +1,255 @@ += Docinfo Files +:url-docbook-info-ref: https://tdg.docbook.org/tdg/5.0/info.html +:url-richfaces-docinfo: https://github.com/richfaces/richfaces-docs/blob/master/Developer_Guide/src/main/docbook/en-US/Developer_Guide-docinfo.xml +// um anchor: docinfo-file + +You can add custom content to the head or footer of an output document using docinfo files. +Docinfo files are useful for injecting auxiliary metadata, stylesheet, and script information into the output not added by the converter. + +The docinfo feature does not apply to all backends. +While it works when converting to output formats such as HTML and DocBook, it does not work when converting to PDF using Asciidoctor PDF. + +The docinfo feature must be explicitly enabled using the `docinfo` attribute (see <>). +Which docinfo files get used depends on the value of the `docinfo` attribute as well as the backend. + +[#head] +== Head docinfo files + +The content of head docinfo files gets injected into the top of the document. +For HTML, the content is append to the `` element. +For DocBook, the content is appended to the root `` element. + +The docinfo file for HTML output may contain valid elements to populate the HTML `` element, including: + +* `` +* `` +* `` +* `