Skip to content
项目

asciidoctor/asciidoctor-reveal.js

在 GitHub 查看

关于

:crystal_ball: A reveal.js converter for Asciidoctor and Asciidoctor.js. Write your slides in AsciiDoc!

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

reveal.js converter for Asciidoctor.js

A reveal.js converter for Asciidoctor.js that transforms an AsciiDoc document into an HTML5 presentation designed to be executed by the reveal.js presentation framework.

Install

Requires Node.js >= 20. asciidoctor is a required peer dependency (any >=4.2.1 <5.0.0 release), so install it alongside the converter:

npm i --save asciidoctor @asciidoctor/reveal.js

Command line

npx asciidoctor-revealjs presentation.adoc      # writes presentation.html
npx asciidoctor-revealjs -o - presentation.adoc # write to stdout

Run npx asciidoctor-revealjs --help for the full option list.

JavaScript API

Asciidoctor.js 4.0 is an ESM package and its conversion functions are asynchronous, so use import and await:

import { convertFile } from 'asciidoctor'
import { register } from '@asciidoctor/reveal.js'

register() // registers the revealjs / reveal.js backends and the highlight.js adapter

await convertFile('presentation.adoc', { safe: 'safe', backend: 'revealjs' })

Documentation

For setup instructions and the AsciiDoc syntax used to write a presentation, see the documentation.

License

MIT.

探索相关项目

加载中…