Mejora el uso del nuevo módulo mdBook
This commit is contained in:
parent
348ca88290
commit
c0a269f009
42 changed files with 6540 additions and 39 deletions
17
pagetop-mdbook/build.rs
Normal file
17
pagetop-mdbook/build.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use static_files::resource_dir;
|
||||
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
build_resource_dir("./static", "mdbook")
|
||||
}
|
||||
|
||||
fn build_resource_dir(dir: &str, name: &str) -> std::io::Result<()> {
|
||||
let mut resource = resource_dir(dir);
|
||||
resource.with_generated_filename(
|
||||
Path::new(env::var("OUT_DIR").unwrap().as_str()).join(format!("{}.rs", name)),
|
||||
);
|
||||
resource.with_module_name(format!("resources_{}", name));
|
||||
resource.build()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue