Preparation
Installing Fusuma
Fusuma requires Node >= 12.x.
$ npm i fusuma -D # yarn add fusuma --dev
Directory Structure
The default directory name is slides
and Fusuma provides init
command so it's better to use it.
$ mkdir slides && echo '# Helloπ' > slides/title.md
$ tree -a
.
βββ slides
βββ title.md
1 directory, 1 files
# or use init command
$ npx fusuma init
$ tree -a
.
βββ .fusumarc.yml
βββ slides
β βββ 0-title.md
βββ style.css
1 directory, 3 files
Slide Loading Order
.
βββ .fusumarc.yml <-- [optional] the configuration file
βββ index.js <-- [optional] js extending fusuma
βββ slides <-- [required] slides written by Markdown or HTML
β βββ 0-title.md
β βββ 01-content.md
β βββ 02-body
β β βββ 0-title.md
β βββ 03-end.md
βββ style.css <-- [optional] css extending fusuma
A file extension doesn't matter either
.md
or.mdx
.
Searching slides are based on root hierarchy, and searching order is numeric, alphabetical.
The slide display order is as follows.
0-title.md -> 01-content.md -> 0-title.md(in 02-body) -> 03-end.md
package.json
It is good to define in pacakge.json as follows.
{
"start": "fusuma start",
"start:prod": "fusuma start-prod",
"build": "fusuma build",
"deploy": "npm run build && fusuma deploy",
"pdf": "npm run build && fusuma pdf"
}