mirror of
https://github.com/getzola/zola
synced 2024-11-10 06:14:19 +00:00
parent
8a6d3d42ec
commit
a0da580f87
3 changed files with 9 additions and 1 deletions
|
@ -37,6 +37,7 @@ sections up to the index to be used with the `get_section` Tera function
|
|||
- Ensure content directory exists before rendering aliases
|
||||
- Do not include drafts in pagination
|
||||
- Pages filenames starting by a date will now use that date as page date if there isn't one defined in frontmatter
|
||||
- Accept markdown files starting with BOM
|
||||
|
||||
## 0.4.2 (2018-09-03)
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@ pub fn read_file(path: &Path) -> Result<String> {
|
|||
.chain_err(|| format!("Failed to open '{:?}'", path.display()))?
|
||||
.read_to_string(&mut content)?;
|
||||
|
||||
// Remove utf-8 BOM if any.
|
||||
if content.starts_with("\u{feff}") {
|
||||
content.drain(..3);
|
||||
}
|
||||
|
||||
Ok(content)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
+++
|
||||
+++
|
||||
+++
|
||||
|
||||
This file starts with a UTF-8 BOM and should be loaded
|
||||
|
|
Loading…
Reference in a new issue