mirror of
https://github.com/getzola/zola
synced 2024-11-10 14:24:27 +00:00
Ignore sass directories starting with _ (#1084)
Prior to this change, only sass files starting with _ were ignored by Zola's sass compiler. This made using sass frameworks incredibly inconvenient, as Zola attempted to compile every single sass file in the framework, and inevitably errored due to them not being standalone. For example, to use the Bulma framework, you had to manually add an underscore to the beginning of *every* sass file in it so Zola would stop trying to compile them as standalone css files. Now you can change the directory name to _bulma and have the same result.
This commit is contained in:
parent
d21ac14423
commit
24d47845f4
1 changed files with 1 additions and 1 deletions
|
@ -882,7 +882,7 @@ impl Site {
|
|||
.expect("Invalid glob for sass")
|
||||
.filter_map(|e| e.ok())
|
||||
.filter(|entry| {
|
||||
!entry.as_path().file_name().unwrap().to_string_lossy().starts_with('_')
|
||||
!entry.as_path().components().any(|c| c.as_os_str().to_string_lossy().starts_with('_'))
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue