我想在Asciidoctor Reveal.js的帮助下创建一些幻灯片,我想用Rake来构建我的幻灯片就足够了。但我要将Reveal.js设置为Asciidoctor的后端。
require 'asciidoctor'
task default: %w[html5]
MASTER_FILENAME='slides.adoc'
OUTPUT_FILENAME='index.html'
task :html5 do
puts "Source is #{MASTER_FILENAME}"
begin
Asciidoctor.convert_file MASTER_FILENAME,
safe: :safe,
to_file: OUTPUT_FILENAME
backend: 'revealjs'
puts "?\t#{OUTPUT_FILENAME} created"
rescue StandardError => e
puts "?\t" + e.message
end
end有什么建议如何开启Reveal.js作为后台吗?
发布于 2019-06-25 06:03:19
Reveal.js本身并不是Asciidoctor的后端。
asciidoctor-reveal.js是一个转换器,可以协调将Asciidoctor源文件转换为使用reveal.js的超文本标记语言。通过使用asciidoctor.js,asciidoctor-reveal.js可以在运行时注册为asciidoctor.js后端(它对基于Ruby的asciidoctor命令行工具没有影响)。
您需要调整您的rake处理以遵循此处的说明:https://asciidoctor.org/docs/asciidoctor-revealjs/#node-javascript-setup
https://stackoverflow.com/questions/55192295
复制相似问题