Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: zola panic if no static dir #2608

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cmd/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use ws::{Message, Sender, WebSocket};
use errors::{anyhow, Context, Error, Result};
use site::sass::compile_sass;
use site::{Site, SITE_CONTENT};
use utils::fs::{clean_site_output_folder, copy_file};
use utils::fs::{clean_site_output_folder, copy_file, create_directory};

use crate::fs_utils::{filter_events, ChangeKind, SimpleFileSystemEventKind};
use crate::messages;
Expand Down Expand Up @@ -502,6 +502,7 @@ pub fn serve(
let ws_port = site.live_reload;
let ws_address = format!("{}:{}", interface, ws_port.unwrap());
let output_path = site.output_path.clone();
create_directory(&output_path)?;

// static_root needs to be canonicalized because we do the same for the http server.
let static_root = std::fs::canonicalize(&output_path).unwrap();
Expand Down