Browse Source

Provide friendlier error messages

In case of broken `projects` link in talk/publication front matter

See #534
George Cushen 7 years ago
parent
commit
8a883d4d40
2 changed files with 2 additions and 2 deletions
  1. 1 1
      layouts/partials/publication_links.html
  2. 1 1
      layouts/partials/talk_links.html

+ 1 - 1
layouts/partials/publication_links.html

@@ -36,7 +36,7 @@
     {{ i18n "btn_project" }}
   </a>
   {{ else }}
-    {{ errorf "Please check that the `projects` parameter in the front matter of content in `content/publication/` refers to an existing filename (without .md extension) of a published project." }}
+    {{ errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . }}
   {{ end }}
 {{ end }}
 {{ else }}

+ 1 - 1
layouts/partials/talk_links.html

@@ -27,7 +27,7 @@
     {{ i18n "btn_project" }}
   </a>
   {{ else }}
-    {{ errorf "Please check that the `projects` parameter in the front matter of content in `content/talk/` refers to an existing filename (without .md extension) of a published project." }}
+    {{ errorf "The `projects` parameter in `content/%s` references a project file, `content/project/%s`, which cannot be found. Please either set `projects = []` or fix the reference." $.File.Path . }}
   {{ end }}
 {{ end }}
 {{ range $.Params.url_custom }}