mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-14 17:05:02 +01:00
things
This commit is contained in:
parent
43d792e148
commit
89b3e2df37
13 changed files with 211 additions and 40 deletions
26
src/build/slides.rs
Normal file
26
src/build/slides.rs
Normal 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(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue