asciidoctor: add revealjs support

This allows creating HTML presentations with
`asciidoctor-revealjs presentation.adoc`.

NOTE: The generated HTML file implicitly depend on reveal.js (and I see
no good way to bundle it with Nix). Either provide reveal.js in a local
path next to the generated HTML file[1], or override the revealjsdir
attribute, for example by pointing to an URL (can also be a path):

  asciidoctor-revealjs -a revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2 presentation.adoc

Implementation details:
1. Added "gem 'asciidoctor-revealjs'" to the Gemfile.
2. Ran "nix-shell -p bundler --run 'bundle lock --update'"
   from pkgs/tools/typesetting/asciidoctor/.
3. Hand edited Gemfile.lock to remove all but the asciidoctor-revealjs
   changes. (Rationale: allow backporting to release-20.09.)
4. Finish off with "nix-shell -p bundix --run 'bundix'".

[1] Of course Nix can help with _that_, but that's external to the
asciidoctor-revealjs program.
This commit is contained in:
Bjørn Forsman 2020-11-20 19:33:39 +01:00
parent 8c19846912
commit 8f13d3cada
4 changed files with 53 additions and 0 deletions

View file

@ -4,6 +4,7 @@ gem 'asciidoctor-diagram'
gem 'asciidoctor-pdf'
gem 'asciidoctor-epub3'
gem 'asciidoctor-mathematical'
gem 'asciidoctor-revealjs'
gem 'coderay'
gem 'pygments.rb'
gem 'rouge'

View file

@ -28,6 +28,11 @@ GEM
safe_yaml (~> 1.0.0)
thread_safe (~> 0.3.0)
treetop (~> 1.5.0)
asciidoctor-revealjs (4.0.1)
asciidoctor (>= 2.0.0, < 3.0.0)
concurrent-ruby (~> 1.0)
thread_safe (~> 0.3.5)
asciimath (2.0.1)
coderay (1.1.2)
concurrent-ruby (1.1.5)
css_parser (1.7.0)
@ -40,6 +45,9 @@ GEM
concurrent-ruby (~> 1.0)
mathematical (1.6.12)
ruby-enum (~> 0.4)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2020.1104)
mini_portile2 (2.4.0)
multi_json (1.13.1)
nokogiri (1.10.3)
@ -88,6 +96,7 @@ DEPENDENCIES
asciidoctor-epub3
asciidoctor-mathematical
asciidoctor-pdf
asciidoctor-revealjs
coderay
pygments.rb
rouge

View file

@ -13,6 +13,7 @@ let
"asciidoctor"
"asciidoctor-pdf"
"asciidoctor-epub3"
"asciidoctor-revealjs"
];
buildInputs = [ makeWrapper ];

View file

@ -84,6 +84,27 @@
};
version = "1.5.0.alpha.18";
};
asciidoctor-revealjs = {
dependencies = ["asciidoctor" "concurrent-ruby" "thread_safe"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "084aq9frv4irzgd9ab3xad9i0ml9lb58w0wvg76gnwwr51plbpp4";
type = "gem";
};
version = "4.0.1";
};
asciimath = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1aapydwwkydbwgz07n7ma3a5jy9n3v0shy6q6j8mi4wr3crhx45a";
type = "gem";
};
version = "2.0.1";
};
coderay = {
groups = ["default"];
platforms = [];
@ -158,6 +179,27 @@
};
version = "1.6.12";
};
mime-types = {
dependencies = ["mime-types-data"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
type = "gem";
};
version = "3.3.1";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ipjyfwn9nlvpcl8knq3jk4g5f12cflwdbaiqxcq1s7vwfwfxcag";
type = "gem";
};
version = "3.2020.1104";
};
mini_portile2 = {
groups = ["default"];
platforms = [];