question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for building multiple presentations or custom export filenames

See original GitHub issue

First of all, thanks so much for all the hard work that’s gone into this package. It’s been a HUGE timesaver building presentations for my job.

I have a scenario that I’m wondering if there’s an easier way to support. I have built several presentations which all share the same theme, images, fonts, etc. And as such I’ve kept them all in the same repo so they can share assets. The problem comes at build time. As far as I can tell the default build script is only capable of outputing a single presentation at a time, and always names them as index.html and main.js. This is a fine for building a single presentation, but what I’ve had to do is write my own wrapper around the mdx-deck build script which catches the files after they’ve been output and renames them. Would it be possible to add a configuration option that allows the user to specify the output filenames in the CLI? I’m envisioning something like this:

mdx-deck build presentation.mdx --filename custom-name

Which would output the following:

├── dist/
│   ├── custom-name.html
│   ├── custom-name.js

Or alternatively, the build script could accept an array of presentation arguments, which it would use to automatically generate these filenames like this:

mdx-deck build slides1.mdx slides2.mdx slides3.mdx

Which would output:

├── dist/
│   ├── slides1.html
│   ├── slides1.js
│   ├── slides2.html
│   ├── slides2.js
│   ├── slides3.html
│   ├── slides3.js

If I was more comfortable with Webpack I would just put in a pull request myself, but as it stands I thought I would just bring this use-case to your attention. I’ve solved this problem for myself with some ancillary tooling, but it would be nice to have it baked in for future projects.

One other thought, at first run, I anticipated that the build script would also copy any static assets being used and include them in the dist folder. Would this as an option also be possible? I’ve ended up having to write a post-build script that finds the assets and copies them to the build folder so all of the relative links still work. Anyways, just a thought.

Thanks again!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jxnblkcommented, Apr 20, 2019

The new Gatsby theme lets you develop multiple decks at once in the same site. This will be the recommended way going forward, so closing this issue for now

0reactions
sibeliuscommented, Apr 9, 2019

Here is a example of multiple mdx-deck https://github.com/sibelius/relay-modern-course

in a monorepo

it was deployed using now.sh here: https://relay-modern-course.now.sh/packages/

it would be cool to run all slides all at once for development and be able to link one set of slides in another one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export a presentation - Microsoft Support
File > Export helps you change your presentation into a different format, such as PDF, video, or Word-based handouts. All these options are...
Read more >
Export documents, layers, and artboards in Photoshop
By dividing the image, you can assign different URL links to create page navigation, or optimize each part of an image using its...
Read more >
Export photos, videos, slideshows, and memories in Photos ...
In Photos on your Mac, export photos, videos, slideshows, and memories so you can import them into another app to view and work...
Read more >
Fill the MRU (Most Recently Used) list with bogus file names
Image Export converts PowerPoint slides to high-quality images. PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint ......
Read more >
Exporting Stored Data In Dewesoft X
The other file formats (except FlexPro and MS Excel) just prompt you for a filename, which you supply using s standard Windows file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found