webpro/reveal-md — dự án mã nguồn mở — đang có 3.9k sao GitHub. reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
reveal.js on steroids! Get beautiful reveal.js presentations from Markdown files.
[!WARNING]
reveal-md is no longer in active development.
No new features will be added. Pull requests for bug and documentation fixes will be considered. Occasional dependency
upgrades and CVEs might happen.
Thanks for using reveal-md! Please consider these Markdown-based alternatives:
MkSlides (successor to reveal-md)
Slidev
Installation
npm install -g reveal-md
Usage
reveal-md slides.md
This starts a local server and opens any Markdown file as a reveal.js presentation in the default browser.
Docker
You can use Docker to run this tool without needing Node.js installed on your machine. Run the public Docker image,
providing your markdown slides as a volume. A few examples:
docker run --rm -p 1948:1948 -v <path-to-your-slides>:/slides webpronl/reveal-md:latest
docker run --rm -p 1948:1948 -v <path-to-your-slides>:/slides webpronl/reveal-md:latest --help
The service is now running at http://localhost:1948.
To enable live reload in the container, port 35729 should be mapped as well:
The Markdown feature of reveal.js is awesome, and has an easy (and configurable) syntax to separate slides. Use three
dashes surrounded by two blank lines (\n---\n). Example:
# Title
- Point 1
- Point 2
---
## Second slide
> Best quote ever.
Note: speaker notes FTW!
Code section
Syntax highlighting
```js
console.log('Hello world!');
```
Highlight some lines
You can highlight one line, multiple lines or both.
```python [1|3-6]
n = 0
while n < 10:
if n % 2 == 0:
print(f"{n} is even")
else:
print(f"{n} is odd")
n += 1
```
Theme
Override theme (default: black):
reveal-md slides.md --theme solarized
See available themes.
Override reveal theme with a custom one. In this example, the file is at ./theme/my-custom.css:
reveal-md slides.md --theme theme/my-custom.css
Override reveal theme with a remote one (use rawgit.com because the url must allow cross-site access):
Use the reveal.js slide attributes functionality to add HTML attributes, e.g. custom backgrounds. Alternatively,
add an HTML id attribute to a specific slide and style it with CSS.
Example: set the second slide to have a PNG image as background:
# slide1
This slide has no background image.
---
<!-- .slide: data-background="./image1.png" -->
# slide2
This one does!
reveal-md Options
Define options similar to command-line options in a reveal-md.json file that must be located at the root of the
Markdown files. They'll be picked up automatically. Example:
Using -w option changes to markdown files will trigger the browser to reload and thus display the changed presentation
without the user having to reload the browser.
Don't use absolute file paths, files should be in adjacent or descending folders.
Absolute URL's are allowed.
Custom Favicon
If the directory with the markdown files contains a favicon.ico file, it will automatically be used as a favicon
instead of the default favicon.
Pre-process Markdown
reveal-md can be given a markdown preprocessor script via the --preprocessor (or -P) option. This can be useful to
implement custom tweaks on the document format without having to dive into the guts of the Markdown parser.
For example, to have headers automatically create new slides, one could have the script preproc.js:
// headings trigger a new slide
// headings with a caret (e.g., '##^ foo`) trigger a new vertical slide
module.exports = (markdown, options) => {
return new Promise((resolve, reject) => {
return resolve(
markdown
.split('\n')
.map((line, index) => {
if (!/^#/.test(line) || index === 0) return line;
const is_vertical = /#\^/.test(line);
return (is_vertical ? '\n----\n\n' : '\n---\n\n') + line.replace('#^', '#');
})
.join('\n')
);
});
};
and use it like this
reveal-md --preprocessor ./preproc.js slides.md
Print to PDF
There are (at least) two options to export a deck to a PDF file.
1. Using Puppeteer
Create a (printable) PDF from the provided Markdown file:
reveal-md slides.md --print slides.pdf
The PDF is generated using Puppeteer. Alternatively, append ?view=print to the url from the command-line or in the
browser (make sure to remove the #/ or #/1 hash). Then print the slides using the browser's (not the native) print
dialog. This seems to work in Chrome.
By default, paper size is set to match options in your reveal.json file, falling back to a default value 960x700
pixels. To override this behaviour, you can pass custom dimensions or format in a command line option --print-size:
reveal-md slides.md --print slides.pdf --print-size 1024x768 # in pixels when no unit is given
reveal-md slides.md --print slides.pdf --print-size 210x297mm # valid units are: px, in, cm, mm
reveal-md slides.md --print slides.pdf --print-size A4 # valid formats are: A0-6, Letter, Legal, Tabloid, Ledger
In case of an error, please try the following:
Analyze debug output, e.g. DEBUG=reveal-md reveal-md slides.md --print
See reveal-md help for Puppeteer arguments (puppeteer-launch-args and puppeteer-chromium-executable)
Use Docker & DeckTape:
2. Using Docker & DeckTape
The first method of printing does not currently work when running reveal-md in a Docker container, so it is recommended
that you print with DeckTape instead. Using DeckTape may also resolve issues with the built-in printing method’s
output.
To create a PDF of a presentation using reveal-md running on your localhost using the DeckTape Docker image, use the
following command:
docker run --rm -t --net=host -v $OUTPUT_DIR:/slides astefanutti/decktape $URL $OUTPUT_FILENAME
Replace these variables:
$OUTPUT_DIR is the folder you want the PDF to be saved to.
$OUTPUT_FILENAME is the name of the PDF.
$URL is where the presentation can be accessed in your browser (without the ?view=print suffix). If you are not
running reveal-md in Docker, you will need to replace localhost with the IP address of your computer.
For a full list of export options, please see the the DeckTape github, or run the Docker container with the -h
flag.
Static Website
This will export the provided Markdown file into a stand-alone HTML website including scripts and stylesheets. The files
are saved to the directory passed to the --static parameter (default: ./_static):
reveal-md slides.md --static _site
This should copy images along with the slides. Use --static-dirs to copy directories with other static assets to the
target directory. Use a comma-separated list to copy multiple directories.
reveal-md slides.md --static --static-dirs=assets
Providing a directory will result in a stand-alone overview page with links to the presentations (similar to a
directory listing):
reveal-md dir/ --static
By default, all *.md files in all subdirectories are included in the generated website. Provide a custom glob
pattern using --glob to generate slides only from matching files:
reveal-md dir/ --static --glob '**/slides.md'
Additional --absolute-url and --featured-slide parameters could be used to generate OpenGraph metadata
enabling more attractive rendering for slide deck links when shared in some social sites.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/webpro/reveal-md là nguồn chính thức.
webpro/reveal-md có bao nhiêu sao?
webpro/reveal-md có 3.9k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/webpro/reveal-md. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
webpro/reveal-md có phải mã nguồn mở không?
Có — webpro/reveal-md phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/webpro/reveal-md.
webpro/reveal-md có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho webpro/reveal-md. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
webpro/reveal-md có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho webpro/reveal-md. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
webpro/reveal-md còn đang phát triển không?
Commit gần nhất trên webpro/reveal-md là 6 tháng trước (theo timestamp GitHub). Repo có 414 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về reveal-md?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về reveal-md.