Skip to content

Commit

Permalink
Fix fonts for fastn build
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpita-Jaiswal committed Nov 7, 2023
1 parent e3ebc00 commit c7cb582
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions fastn-core/src/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,20 +593,32 @@ async fn handle_file_(
return Ok(());
}

let req = fastn_core::http::Request::default();
let mut req_config =
fastn_core::RequestConfig::new(config, &req, doc.id.as_str(), base_url);
req_config.current_document = Some(document.get_id().to_string());

let resp = fastn_core::package::package_doc::process_ftd(
&mut req_config,
doc,
base_url,
build_static_files,
test,
file_path.as_str(),
)
.await;
let resp = {
let req = fastn_core::http::Request::default();
let mut req_config =
fastn_core::RequestConfig::new(config, &req, doc.id.as_str(), base_url);
req_config.current_document = Some(document.get_id().to_string());

let resp = fastn_core::package::package_doc::process_ftd(
&mut req_config,
doc,
base_url,
build_static_files,
test,
file_path.as_str(),
)
.await;

config.all_packages.borrow_mut().extend(
req_config
.config
.all_packages
.borrow()
.iter()
.map(|(k, v)| (k.clone(), v.clone())),
);
resp
};

match (resp, ignore_failed) {
(Ok(r), _) => {
Expand Down

0 comments on commit c7cb582

Please sign in to comment.