Add asset list in file not name index.md error message
This commit is contained in:
parent
33951ffe70
commit
74be6d9c15
|
@ -180,7 +180,7 @@ impl Page {
|
||||||
page.assets = find_related_assets(path.parent().unwrap());
|
page.assets = find_related_assets(path.parent().unwrap());
|
||||||
|
|
||||||
if !page.assets.is_empty() && page.file_name != "index" {
|
if !page.assets.is_empty() && page.file_name != "index" {
|
||||||
bail!("Page `{}` has assets but is not named index.md", path.display());
|
bail!("Page `{}` has assets ({:?}) but is not named index.md", path.display(), page.assets);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(page)
|
Ok(page)
|
||||||
|
|
Loading…
Reference in a new issue