yhatt / marp-cli-example

The good starter for using Marp via Marp CLI, by the author of Marp
https://yhatt.github.io/marp-cli-example
Do What The F*ck You Want To Public License
182 stars 158 forks source link

How to host multiple Marp slides in one GitHub Pages repository? #98

Closed mamintoosi closed 9 months ago

mamintoosi commented 9 months ago

Hi, I'm going to use Marp to create presentations for a course, and I want to host them on GitHub Pages. I have multiple topics in the course, and I want to have separate slides for each topic in the same repository. For example, I want to have something like this: Lectures | archer2-cpp (epcced.github.io) Is it possible with Marp? and if yes, How can I achieve this with Marp?

yhatt commented 9 months ago

Yes. You can modify Marp CLI workflows to input multiple Markdown files and output multiple HTMLs.

For example, this CLI command will input multiple markdown files from the md directory, and output HTML files into html directory.

marp --input-dir ./md -o ./html
$ tree
.
├── md
│   ├── 1.md
│   ├── 2.md
│   └── 3.md
└── html
    ├── 1.html
    ├── 2.html
    └── 3.html