From c3c7ddbda681cc8f44832b0549bb623d3eace748 Mon Sep 17 00:00:00 2001 From: Sarah White Date: Wed, 18 Nov 2020 15:53:10 -0700 Subject: rearchitect modules and filenames and drop asciidoctor folder under docs --- docs/modules/ROOT/nav-converters.adoc | 1 + docs/modules/ROOT/nav-docinfo.adoc | 3 + docs/modules/ROOT/nav-errors.adoc | 1 + docs/modules/ROOT/nav-lang.adoc | 1 + docs/modules/ROOT/nav-safe-modes.adoc | 2 + docs/modules/ROOT/nav-top.adoc | 2 + .../ROOT/pages/attributes-and-safe-modes.adoc | 46 +++ docs/modules/ROOT/pages/converters.adoc | 103 ++++++ docs/modules/ROOT/pages/docinfo.adoc | 255 +++++++++++++ docs/modules/ROOT/pages/errors-and-warnings.adoc | 262 ++++++++++++++ docs/modules/ROOT/pages/features.adoc | 67 ++++ docs/modules/ROOT/pages/index.adoc | 97 +++++ docs/modules/ROOT/pages/language-support.adoc | 159 ++++++++ docs/modules/ROOT/pages/safe-modes.adoc | 83 +++++ docs/modules/ROOT/pages/whats-new.adoc | 403 +++++++++++++++++++++ docs/modules/api/nav.adoc | 6 + docs/modules/api/pages/convert-strings.adoc | 89 +++++ docs/modules/api/pages/generate-html-toc.adoc | 33 ++ docs/modules/api/pages/index.adoc | 50 +++ docs/modules/api/pages/load-templates.adoc | 24 ++ docs/modules/api/pages/options.adoc | 165 +++++++++ docs/modules/api/pages/set-safe-mode.adoc | 18 + docs/modules/cli/nav.adoc | 6 + docs/modules/cli/pages/index.adoc | 32 ++ docs/modules/cli/pages/io-piping.adoc | 45 +++ docs/modules/cli/pages/options.adoc | 138 +++++++ docs/modules/cli/pages/output-file.adoc | 39 ++ docs/modules/cli/pages/process-multiple-files.adoc | 48 +++ docs/modules/cli/pages/set-safe-mode.adoc | 19 + docs/modules/docbook-backend/nav.adoc | 1 + docs/modules/docbook-backend/pages/index.adoc | 82 +++++ docs/modules/extensions/nav.adoc | 11 + .../extensions/pages/block-macro-processor.adoc | 48 +++ docs/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 +++ docs/modules/extensions/pages/index.adoc | 51 +++ .../extensions/pages/inline-macro-processor.adoc | 48 +++ docs/modules/extensions/pages/postprocessor.adoc | 33 ++ docs/modules/extensions/pages/preprocessor.adoc | 66 ++++ docs/modules/extensions/pages/register.adoc | 25 ++ docs/modules/extensions/pages/tree-processor.adoc | 83 +++++ docs/modules/get-started/nav.adoc | 1 + docs/modules/get-started/pages/index.adoc | 50 +++ .../html-backend/examples/mysample-data-uri.adoc | 17 + .../html-backend/examples/mysample-link.adoc | 13 + .../examples/mysample-stylesdir-link.adoc | 15 + .../html-backend/examples/mysample-stylesdir.adoc | 14 + .../html-backend/examples/mysample-stylesheet.adoc | 13 + docs/modules/html-backend/examples/mysample.adoc | 12 + docs/modules/html-backend/examples/wrap.adoc | 17 + docs/modules/html-backend/nav.adoc | 9 + .../html-backend/pages/apply-code-stylesheets.adoc | 27 ++ .../html-backend/pages/apply-stylesheet.adoc | 97 +++++ docs/modules/html-backend/pages/favicon.adoc | 48 +++ docs/modules/html-backend/pages/index.adoc | 81 +++++ docs/modules/html-backend/pages/manage-images.adoc | 24 ++ .../html-backend/pages/manage-stylesheets.adoc | 46 +++ .../html-backend/pages/skip-front-matter.adoc | 30 ++ .../html-backend/pages/verbatim-line-wrap.adoc | 40 ++ docs/modules/install/nav.adoc | 6 + docs/modules/install/pages/gem.adoc | 67 ++++ docs/modules/install/pages/index.adoc | 17 + docs/modules/install/pages/linux.adoc | 84 +++++ docs/modules/install/pages/macos.adoc | 23 ++ .../modules/install/pages/supported-platforms.adoc | 45 +++ docs/modules/install/pages/windows.adoc | 18 + docs/modules/install/partials/success.adoc | 12 + docs/modules/integrations/nav.adoc | 9 + docs/modules/integrations/pages/asciimath-gem.adoc | 39 ++ docs/modules/integrations/pages/coderay.adoc | 107 ++++++ docs/modules/integrations/pages/highlightjs.adoc | 42 +++ docs/modules/integrations/pages/mathjax.adoc | 7 + docs/modules/integrations/pages/pygments.adoc | 156 ++++++++ docs/modules/integrations/pages/rouge.adoc | 70 ++++ docs/modules/integrations/pages/stem.adoc | 15 + .../integrations/pages/syntax-highlighters.adoc | 26 ++ docs/modules/manpage-backend/examples/manpage.adoc | 42 +++ docs/modules/manpage-backend/nav.adoc | 1 + docs/modules/manpage-backend/pages/index.adoc | 116 ++++++ docs/modules/migrate/examples/convert.groovy | 43 +++ docs/modules/migrate/nav.adoc | 7 + docs/modules/migrate/pages/asciidoc-python.adoc | 368 +++++++++++++++++++ docs/modules/migrate/pages/confluence-xhtml.adoc | 29 ++ docs/modules/migrate/pages/docbook-xml.adoc | 19 + docs/modules/migrate/pages/markdown.adoc | 6 + docs/modules/migrate/pages/ms-word.adoc | 196 ++++++++++ docs/modules/migrate/pages/upgrade.adoc | 158 ++++++++ docs/modules/tooling/nav.adoc | 1 + docs/modules/tooling/pages/index.adoc | 74 ++++ 91 files changed, 5188 insertions(+) create mode 100644 docs/modules/ROOT/nav-converters.adoc create mode 100644 docs/modules/ROOT/nav-docinfo.adoc create mode 100644 docs/modules/ROOT/nav-errors.adoc create mode 100644 docs/modules/ROOT/nav-lang.adoc create mode 100644 docs/modules/ROOT/nav-safe-modes.adoc create mode 100644 docs/modules/ROOT/nav-top.adoc create mode 100644 docs/modules/ROOT/pages/attributes-and-safe-modes.adoc create mode 100644 docs/modules/ROOT/pages/converters.adoc create mode 100644 docs/modules/ROOT/pages/docinfo.adoc create mode 100644 docs/modules/ROOT/pages/errors-and-warnings.adoc create mode 100644 docs/modules/ROOT/pages/features.adoc create mode 100644 docs/modules/ROOT/pages/index.adoc create mode 100644 docs/modules/ROOT/pages/language-support.adoc create mode 100644 docs/modules/ROOT/pages/safe-modes.adoc create mode 100644 docs/modules/ROOT/pages/whats-new.adoc create mode 100644 docs/modules/api/nav.adoc create mode 100644 docs/modules/api/pages/convert-strings.adoc create mode 100644 docs/modules/api/pages/generate-html-toc.adoc create mode 100644 docs/modules/api/pages/index.adoc create mode 100644 docs/modules/api/pages/load-templates.adoc create mode 100644 docs/modules/api/pages/options.adoc create mode 100644 docs/modules/api/pages/set-safe-mode.adoc create mode 100644 docs/modules/cli/nav.adoc create mode 100644 docs/modules/cli/pages/index.adoc create mode 100644 docs/modules/cli/pages/io-piping.adoc create mode 100644 docs/modules/cli/pages/options.adoc create mode 100644 docs/modules/cli/pages/output-file.adoc create mode 100644 docs/modules/cli/pages/process-multiple-files.adoc create mode 100644 docs/modules/cli/pages/set-safe-mode.adoc create mode 100644 docs/modules/docbook-backend/nav.adoc create mode 100644 docs/modules/docbook-backend/pages/index.adoc create mode 100644 docs/modules/extensions/nav.adoc create mode 100644 docs/modules/extensions/pages/block-macro-processor.adoc create mode 100644 docs/modules/extensions/pages/block-processor.adoc create mode 100644 docs/modules/extensions/pages/compound-block-processor.adoc create mode 100644 docs/modules/extensions/pages/docinfo-processor.adoc create mode 100644 docs/modules/extensions/pages/include-processor.adoc create mode 100644 docs/modules/extensions/pages/index.adoc create mode 100644 docs/modules/extensions/pages/inline-macro-processor.adoc create mode 100644 docs/modules/extensions/pages/postprocessor.adoc create mode 100644 docs/modules/extensions/pages/preprocessor.adoc create mode 100644 docs/modules/extensions/pages/register.adoc create mode 100644 docs/modules/extensions/pages/tree-processor.adoc create mode 100644 docs/modules/get-started/nav.adoc create mode 100644 docs/modules/get-started/pages/index.adoc create mode 100644 docs/modules/html-backend/examples/mysample-data-uri.adoc create mode 100644 docs/modules/html-backend/examples/mysample-link.adoc create mode 100644 docs/modules/html-backend/examples/mysample-stylesdir-link.adoc create mode 100644 docs/modules/html-backend/examples/mysample-stylesdir.adoc create mode 100644 docs/modules/html-backend/examples/mysample-stylesheet.adoc create mode 100644 docs/modules/html-backend/examples/mysample.adoc create mode 100644 docs/modules/html-backend/examples/wrap.adoc create mode 100644 docs/modules/html-backend/nav.adoc create mode 100644 docs/modules/html-backend/pages/apply-code-stylesheets.adoc create mode 100644 docs/modules/html-backend/pages/apply-stylesheet.adoc create mode 100644 docs/modules/html-backend/pages/favicon.adoc create mode 100644 docs/modules/html-backend/pages/index.adoc create mode 100644 docs/modules/html-backend/pages/manage-images.adoc create mode 100644 docs/modules/html-backend/pages/manage-stylesheets.adoc create mode 100644 docs/modules/html-backend/pages/skip-front-matter.adoc create mode 100644 docs/modules/html-backend/pages/verbatim-line-wrap.adoc create mode 100644 docs/modules/install/nav.adoc create mode 100644 docs/modules/install/pages/gem.adoc create mode 100644 docs/modules/install/pages/index.adoc create mode 100644 docs/modules/install/pages/linux.adoc create mode 100644 docs/modules/install/pages/macos.adoc create mode 100644 docs/modules/install/pages/supported-platforms.adoc create mode 100644 docs/modules/install/pages/windows.adoc create mode 100644 docs/modules/install/partials/success.adoc create mode 100644 docs/modules/integrations/nav.adoc create mode 100644 docs/modules/integrations/pages/asciimath-gem.adoc create mode 100644 docs/modules/integrations/pages/coderay.adoc create mode 100644 docs/modules/integrations/pages/highlightjs.adoc create mode 100644 docs/modules/integrations/pages/mathjax.adoc create mode 100644 docs/modules/integrations/pages/pygments.adoc create mode 100644 docs/modules/integrations/pages/rouge.adoc create mode 100644 docs/modules/integrations/pages/stem.adoc create mode 100644 docs/modules/integrations/pages/syntax-highlighters.adoc create mode 100644 docs/modules/manpage-backend/examples/manpage.adoc create mode 100644 docs/modules/manpage-backend/nav.adoc create mode 100644 docs/modules/manpage-backend/pages/index.adoc create mode 100644 docs/modules/migrate/examples/convert.groovy create mode 100644 docs/modules/migrate/nav.adoc create mode 100644 docs/modules/migrate/pages/asciidoc-python.adoc create mode 100644 docs/modules/migrate/pages/confluence-xhtml.adoc create mode 100644 docs/modules/migrate/pages/docbook-xml.adoc create mode 100644 docs/modules/migrate/pages/markdown.adoc create mode 100644 docs/modules/migrate/pages/ms-word.adoc create mode 100644 docs/modules/migrate/pages/upgrade.adoc create mode 100644 docs/modules/tooling/nav.adoc create mode 100644 docs/modules/tooling/pages/index.adoc (limited to 'docs/modules') diff --git a/docs/modules/ROOT/nav-converters.adoc b/docs/modules/ROOT/nav-converters.adoc new file mode 100644 index 00000000..6bc03330 --- /dev/null +++ b/docs/modules/ROOT/nav-converters.adoc @@ -0,0 +1 @@ +* xref:converters.adoc[] diff --git a/docs/modules/ROOT/nav-docinfo.adoc b/docs/modules/ROOT/nav-docinfo.adoc new file mode 100644 index 00000000..dd0e50db --- /dev/null +++ b/docs/modules/ROOT/nav-docinfo.adoc @@ -0,0 +1,3 @@ +* xref:docinfo.adoc[] +//** Adding Header Content +//** Adding Footer Content diff --git a/docs/modules/ROOT/nav-errors.adoc b/docs/modules/ROOT/nav-errors.adoc new file mode 100644 index 00000000..5c15a194 --- /dev/null +++ b/docs/modules/ROOT/nav-errors.adoc @@ -0,0 +1 @@ +* xref:errors-and-warnings.adoc[] diff --git a/docs/modules/ROOT/nav-lang.adoc b/docs/modules/ROOT/nav-lang.adoc new file mode 100644 index 00000000..278dbd67 --- /dev/null +++ b/docs/modules/ROOT/nav-lang.adoc @@ -0,0 +1 @@ +* xref:language-support.adoc[] diff --git a/docs/modules/ROOT/nav-safe-modes.adoc b/docs/modules/ROOT/nav-safe-modes.adoc new file mode 100644 index 00000000..be07ed4d --- /dev/null +++ b/docs/modules/ROOT/nav-safe-modes.adoc @@ -0,0 +1,2 @@ +* xref:safe-modes.adoc[] +** xref:attributes-and-safe-modes.adoc[] diff --git a/docs/modules/ROOT/nav-top.adoc b/docs/modules/ROOT/nav-top.adoc new file mode 100644 index 00000000..98431ff5 --- /dev/null +++ b/docs/modules/ROOT/nav-top.adoc @@ -0,0 +1,2 @@ +* xref:features.adoc[] +* xref:whats-new.adoc[] diff --git a/docs/modules/ROOT/pages/attributes-and-safe-modes.adoc b/docs/modules/ROOT/pages/attributes-and-safe-modes.adoc new file mode 100644 index 00000000..4d28d210 --- /dev/null +++ b/docs/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/modules/ROOT/pages/converters.adoc b/docs/modules/ROOT/pages/converters.adoc new file mode 100644 index 00000000..9340f9f0 --- /dev/null +++ b/docs/modules/ROOT/pages/converters.adoc @@ -0,0 +1,103 @@ += Available Converters + +Asciidoctor parses AsciiDoc documents and then uses a converter to generate the output format of your choice, such as HTML, DocBook, or PDF. + +== 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 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 add-on 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. + +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:html-backend:index.adoc#xhtml[XHTML]:: +The XHTML variant of the HTML 5 converter. +To use the XHTML converter, assign `xhtml` or `xhtml5` to the `backend` option. + +xref:docbook-backend:index.adoc[DocBook]:: +The DocBook 5.0 converter generates DocBook 5.0 XML. +To use the DocBook converter, assign `docbook` or `docbook5` to the `backend` option. + +xref:manpage-backend:index.adoc[Man page]:: +The man page converter generates manual pages for software used on Unix and Unix-like operating systems. +To use the man page converter, assign `manpage` to the `backend` option. + +== Add-on 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. + +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^]. + +//// +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). + +=== Static site generators + +* Jekyll +* Middleman +* Antora +//// + +// 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/modules/ROOT/pages/docinfo.adoc b/docs/modules/ROOT/pages/docinfo.adoc new file mode 100644 index 00000000..2c2cc28c --- /dev/null +++ b/docs/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: + +* `` +* `` +* `` +* `