|
|
@@ -32,11 +32,11 @@ use tera::{Tera, Context}; |
|
|
|
use walkdir::WalkDir; |
|
|
|
|
|
|
|
#[cfg(not(target_os = "windows"))] |
|
|
|
use sass_rs::{Options, compile_string}; |
|
|
|
use sass_rs::{Options, compile_file}; |
|
|
|
|
|
|
|
use errors::{Result, ResultExt}; |
|
|
|
use config::{Config, get_config}; |
|
|
|
use utils::fs::{create_file, read_file, create_directory, ensure_directory_exists}; |
|
|
|
use utils::fs::{create_file, create_directory, ensure_directory_exists}; |
|
|
|
use content::{Page, Section, populate_previous_and_next_pages, sort_pages}; |
|
|
|
use templates::{GUTENBERG_TERA, global_fns, render_redirect_template}; |
|
|
|
use front_matter::{SortBy, InsertAnchor}; |
|
|
@@ -462,8 +462,7 @@ impl Site { |
|
|
|
|
|
|
|
for file in files { |
|
|
|
let name = file.as_path().file_stem().unwrap().to_string_lossy(); |
|
|
|
let content = read_file(&file)?; |
|
|
|
let css = match compile_string(&content, Options::default()) { |
|
|
|
let css = match compile_file(file.as_path().to_str().unwrap(), Options::default()) { |
|
|
|
Ok(c) => c, |
|
|
|
Err(e) => bail!(e) |
|
|
|
}; |
|
|
|