maaslalani / slides

Terminal based presentation tool
http://maaslalani.com/slides/
MIT License
10.06k stars 277 forks source link

Support for includes/multiple markdown files #277

Closed pinpox closed 7 months ago

pinpox commented 10 months ago

Is your feature request related to a problem? Please describe. With long presentations, it would be nice if there was some convenient mechanism to split them up into multiple markdown files. It makes editing and working in a team easier.

Describe the solution you'd like Possible solutions I can think of would be:

Describe alternatives you've considered This might be possible to workaround with https://github.com/maaslalani/slides/pull/17 but I have not found a nice way of doing it that ensures the correct order and doesn't involve an external script or huge one-liner.

Additional context If this is already possible, please let me know how or point me to the docs for this feature. If it's undocumented, it might be worth adding an example

RonaldoRhoney commented 9 months ago

The is most magnificent developer builders. My curious 🧐 to attend. Now I believe this is more satisfactory working.

Thank you for your contribution!!

maaslalani commented 9 months ago

Hey @pinpox, have you tried using cat to concatenate slides then pass them through stdin?

cat *.md | slides

You could prefix the files with 00_, 01_, 02_, etc... to maintain order.

erszk commented 7 months ago

Along similar lines, this is one reason why m4 exists.

Inside your file presentation.md:

...

m4_include(otherslides.md)
m4_include(somemoreslides.md)

...

run slides <(m4 -P presentation.md)

maaslalani commented 7 months ago

We may add this feature later, but for now I believe using unix tools (cat) is the way to go!