add: allow lisp templates (bberry)
This commit is contained in:
parent
8de5c0ea76
commit
78d0766345
10 changed files with 296 additions and 263 deletions
|
@ -7,7 +7,15 @@ macro_rules! write_template {
|
|||
($into:ident->$path:literal($as:expr) --config=$config:ident) => {
|
||||
std::fs::write(
|
||||
$into.join($path),
|
||||
$crate::assets::replace_in_html($as, &$config).await,
|
||||
$crate::assets::replace_in_html($as, &$config, false).await,
|
||||
)
|
||||
.unwrap();
|
||||
};
|
||||
|
||||
($into:ident->$path:literal($as:expr) --config=$config:ident --lisp) => {
|
||||
std::fs::write(
|
||||
$into.join($path),
|
||||
$crate::assets::replace_in_html($as, &$config, true).await,
|
||||
)
|
||||
.unwrap();
|
||||
};
|
||||
|
@ -29,7 +37,20 @@ macro_rules! write_template {
|
|||
|
||||
std::fs::write(
|
||||
$into.join($path),
|
||||
$crate::assets::replace_in_html($as, &$config).await,
|
||||
$crate::assets::replace_in_html($as, &$config, false).await,
|
||||
)
|
||||
.unwrap();
|
||||
};
|
||||
|
||||
($into:ident->$path:literal($as:expr) -d $dir_path:literal --config=$config:ident --lisp) => {
|
||||
let dir = $into.join($dir_path);
|
||||
if !std::fs::exists(&dir).unwrap() {
|
||||
std::fs::create_dir(dir).unwrap();
|
||||
}
|
||||
|
||||
std::fs::write(
|
||||
$into.join($path),
|
||||
$crate::assets::replace_in_html($as, &$config, true).await,
|
||||
)
|
||||
.unwrap();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue