Clearer error message when failing to load theme.toml
This commit is contained in:
parent
2c79eeb8be
commit
44a33c020c
|
@ -22,6 +22,7 @@
|
||||||
- Syntax highlighting default was mistakenly `true`, it has been set to `false`
|
- Syntax highlighting default was mistakenly `true`, it has been set to `false`
|
||||||
- Add NO_COLOR and CLICOLOR support for having colours or not in CLI output
|
- Add NO_COLOR and CLICOLOR support for having colours or not in CLI output
|
||||||
- Fix `robots.txt`template not being used
|
- Fix `robots.txt`template not being used
|
||||||
|
- RSS feed now takes all available articles by default instead of limiting to 10000
|
||||||
|
|
||||||
## 0.4.2 (2018-09-03)
|
## 0.4.2 (2018-09-03)
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,11 @@ impl Theme {
|
||||||
pub fn from_file(path: &PathBuf) -> Result<Theme> {
|
pub fn from_file(path: &PathBuf) -> Result<Theme> {
|
||||||
let mut content = String::new();
|
let mut content = String::new();
|
||||||
File::open(path)
|
File::open(path)
|
||||||
.chain_err(|| "No `theme.toml` file found. Are you in the right directory?")?
|
.chain_err(||
|
||||||
|
"No `theme.toml` file found. \
|
||||||
|
Is the `theme` defined in your `config.toml present in the `themes` directory \
|
||||||
|
and does it have a `theme.toml` inside?"
|
||||||
|
)?
|
||||||
.read_to_string(&mut content)?;
|
.read_to_string(&mut content)?;
|
||||||
|
|
||||||
Theme::parse(&content)
|
Theme::parse(&content)
|
||||||
|
|
Loading…
Reference in a new issue