OrchidAsciidoc

Compile your content using Asciidoctor.


About

OrchidAsciidoc adds support for AsciiDoc markup in Orchid, as a replacement for Markdown.

Installation

dependencies {
    orchidRuntime("io.github.javaeden.orchid:OrchidAsciidoc:0.21.0")
}
<dependency>
    <groupId>io.github.javaeden.orchid</groupId>
    <artifactId>OrchidAsciidoc</artifactId>
    <version>0.21.0</version>
    <type>pom</type>
</dependency>
libraryDependencies += "io.github.javaeden.orchid" % "OrchidAsciidoc" % "0.21.0"
@file:DependsOn("io.github.javaeden.orchid:OrchidAsciidoc:0.21.0")

Demo

Source
= My Article
J. Smith

https://wikipedia.org[Wikipedia] is an
on-line encyclopaedia, available in
English and *many* other languages.

*Software*

You can install 'package-name' using
the `gem` command:

 gem install package-name

*Hardware*

Metals commonly used include:

* copper
* tin
* lead
Result

Wikipedia is an on-line encyclopaedia, available in English and many other languages.

Software

You can install 'package-name' using the gem command:

gem install package-name

Hardware

Metals commonly used include:

  • copper

  • tin

  • lead

Usage

Simply include this plugin and you're all set. Orchid will now recognize files with file extensions of ad, adoc, asciidoc, or asciidoctor, and compile them as Asciidoc instead of Markdown, no further configuration necessary.

. / (resources root)
├── homepage.md
├── config.yml
└── pages/
    ├── page1.md
    └── page2.adoc <-- will be processed as AsciiDoc

Of course, you may also embed chunks of AsciiDoc markup within content of other formats using compileAs('adoc'):

## Markdown Header

{% filter compileAs('adoc') %} <-- filtered block will be processed as AsciiDoc
= AsciiDoc Header
{% endfilter %}

Includes

Files can be included using the standard include::[] directive. Included files are first resolved relative to the current file, which is the normal behavior of Asciidoctor. If no file can be found relative to it, Orchid will then check for a file at the given path in your site resources, similar to how most other inclues in Orchid work. Nested relative includes are not currently supported.

= homepage.adoc

include::other_page.adoc[]

Due to constraints with the AsciidoctorJ library, the following limitation exists when including files in Orchid.

  • tag and tags attributes may not cover the full range of functionality available in Asciidoctor, as it had to be re-implemented manually in Orchid. Tag names and the * wildcard are supported, but tag filtering through negations or more complex wildcard usage is not currently supported. If this is a feature you are needing, please leave a comment on this issue to let the Asciidoctor maintainers know you want this functionality in Orchid!

Images

Images are not currently supported. Local images references by the image::[] macro will not be copied to the final site automatically, so you should stick with external URLs for now.

= homepage.adoc

image::https://picsum.photos/200/300.jpg[]