This commit is contained in:
nora 2024-01-18 20:47:46 +01:00
parent 43d792e148
commit 89b3e2df37
13 changed files with 211 additions and 40 deletions

26
src/build/slides.rs Normal file
View file

@ -0,0 +1,26 @@
//! Moving the slides from the reveal.js repo
//! The setup is currently a bit bad but I'm not sure what the best solution would look like.
use std::path::Path;
use color_eyre::{eyre::WrapErr, Result};
use crate::{utils, SlidesConfig};
pub fn build(config: &SlidesConfig, slides: &Path, dist: &Path) -> Result<()> {
info!("Building slides");
debug!("Copying reveal.js dist");
utils::cp_r(&slides.join("dist"), &dist.join("dist")).wrap_err("copying reveal.js dist")?;
utils::cp_r(&slides.join("plugin"), &dist.join("plugin")).wrap_err("copying reveal.js dist")?;
for talk in &config.talks {
let path = slides.join(talk);
let dist = dist.join(talk);
utils::cp_r(&path, &dist).wrap_err("copying slide data")?;
}
Ok(())
}