Do not require themes to have a static folder
This commit is contained in:
parent
b558b51dff
commit
43db3a43ff
|
@ -6,6 +6,7 @@
|
|||
- Sitemap entries are now sorted by permalinks to avoid random ordering
|
||||
- Preserve directory structure from sass folder when copying compiled css files
|
||||
to the public directory
|
||||
- Do not require themes to have a static folder
|
||||
|
||||
## 0.3.2 (2018-03-05)
|
||||
|
||||
|
|
|
@ -92,14 +92,11 @@ impl Site {
|
|||
// Grab data from the extra section of the theme
|
||||
config.merge_with_theme(&path.join("themes").join(&theme).join("theme.toml"))?;
|
||||
|
||||
// Test that the {templates,static} folder exist for that theme
|
||||
// Test that the templates folder exist for that theme
|
||||
let theme_path = path.join("themes").join(&theme);
|
||||
if !theme_path.join("templates").exists() {
|
||||
bail!("Theme `{}` is missing a templates folder", theme);
|
||||
}
|
||||
if !theme_path.join("static").exists() {
|
||||
bail!("Theme `{}` is missing a static folder", theme);
|
||||
}
|
||||
|
||||
let theme_tpl_glob = format!("{}/{}", path.to_string_lossy().replace("\\", "/"), "themes/**/*.html");
|
||||
let mut tera_theme = Tera::parse(&theme_tpl_glob).chain_err(|| "Error parsing templates from themes")?;
|
||||
|
|
|
@ -33,6 +33,8 @@ To learn more, read [the content overview](./documentation/content/overview.md).
|
|||
|
||||
## `sass`
|
||||
Contains the [Sass](http://sass-lang.com) files to be compiled. Non-Sass files will be ignored.
|
||||
The directory structure of the `sass` folder will be preserved when copying over the compiled files: a file at
|
||||
`sass/something/site.scss` will be compiled to `public/something/site.css`.
|
||||
|
||||
## `static`
|
||||
Contains any kind of files. All the files/folders in the `static` folder will be copied as-is in the output directory.
|
||||
|
|
Loading…
Reference in a new issue