From 3c27c7181a96159de422a830a03dba99f3848bee Mon Sep 17 00:00:00 2001 From: Don Naro Date: Wed, 20 Sep 2023 22:06:34 +0100 Subject: [PATCH] Docs: add asciidoc example (#10759) add asciidoc example --- docs/user/build-customization.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/user/build-customization.rst b/docs/user/build-customization.rst index fb013d61d2b..4a5648cd536 100644 --- a/docs/user/build-customization.rst +++ b/docs/user/build-customization.rst @@ -463,3 +463,23 @@ These projects can be built using a configuration file like this: commands: - mkdir --parents $READTHEDOCS_OUTPUT/html/ - cp --recursive docs/* $READTHEDOCS_OUTPUT/html/ + +Asciidoc +^^^^^^^^ + +`Asciidoctor `__ is a fast processor for converting and generating documentation from AsciiDoc source. +The Asciidoctor toolchain includes `Asciidoctor.js `__ which you can use with custom build commands. +Here is an example configuration file: + +.. code-block:: yaml + :caption: .readthedocs.yaml + + version: 2 + build: + os: "ubuntu-22.04" + tools: + nodejs: "20" + commands: + - npm i -g asciidoctor + - asciidoctor index.asciidoc + - mkdir -pv $READTHEDOCS_OUTPUT/html/ && mv index.html $READTHEDOCS_OUTPUT/html/