This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Flavored Markdown does not support the specialized features that this project requires, such as use of colors and easy conversion to other file formats. AsciiDoc, like Markdown, uses a readable syntax that is easy to learn. It is also supported by GitHub preview. In addition, AsciiDoc supports more features, such as auto-numbering of sections, auto-generation of table of contents and admonition blocks. Styling is also possible using custom CSS stylesheets. Furthermore, AsciiDoc is designed to make it easy to translate documents to other formats, and Asciidoctor makes it simple for users to generate HTML files from asciidoc documents. Converting to PDF: While Asciidoctor supports conversion to PDF, Asciidoctor PDF is currently an alpha release and does not support useful features such as font colors. Styling must also be done separately in an Asciidoctor PDF theme file, which is different from the CSS used for HTML files. To convert documentation to PDF format, we suggest using the browser's 'save as PDF' function on the generated HTML files instead. Stylesheets: asciidoctor.css is the default stylesheet by Asciidoctor and gh-pages.css is the customized version used by the documentation. Having our customizations in a separate file instead of editing the default stylesheet makes it easy for developers to swap in other stylesheets which import the default stylesheet, such as those available at https://github.com/darshandsoni/asciidoctor-skins. copyStylesheets Gradle task: Asciidoctor suggests using the resources method to copy additional resources (in this case, CSS stylesheets) to the build directory. However, this does not work as Asciidoctor tries to generate the HTML files before copying the resources, as discussed in asciidoctor/asciidoctor-gradle-plugin#178. Let's create a copyStylesheets task to copy the necessary resources before running Asciidoctor instead, a workaround suggested in the issue mentioned above. Asciidoctor attributes: Even though all AsciiDoc files use the same images directory, imagesDir attribute must be set in each individual file instead of in Asciidoctor's attributes. Otherwise, GitHub preview wrongly links to image.png instead of images/image.png so images are not displayed in the preview.
- Loading branch information