A series of tests checking the integrity of the _content data
| Test Name |
Status |
Notes |
| Count |
{% if site.content.size > 100 %}Pass ✅{% else %}FAIL ❌{% endif %} |
With {{ site.content.size }} items in the library. |
| Excessive Authors |
{% assign ea = site.content |
where_exp: "c", "c.authors.size > 5" %}{% if ea.size == 0 %}Pass ✅{% else %}FAIL ❌{% endif %} |
| Course in tags |
{% assign failures = site.content |
where_exp: "c", "c.tags contains c.course" %}{% if failures.size == 0 %}Pass ✅{% else %}FAIL ❌{% endif %} |
| Sane file_links |
{% assign valid_buckets = "exclusive_01" |
split: "," %}{% assign hostedcontent = site.content |
| file_links match formats |
{% assign fs = '' |
split: '' %}{% for c in hostedcontent %}{% for l in c.file_links %}{% assign ee = l |
| Missing Authors |
{% assign expect = '' |
split: '' %}{% for cont in site.content %}{% for auth in cont.authors %}{% unless auth contains " " %}{% unless expect contains auth %}{% assign expect = expect |
| Dangling Authors |
{% assign authors = site.authors |
map: "slug" %}{% for auth in found %}{% assign authors = authors |
| Non-monograph content missing links |
{% assign failures = site.content |
where_exp: "c", "c.external_url == nil" |
| Content missing year |
{% assign failures = site.content |
where_exp: "c", "c.year == nil" %}{% if failures.size == 0 %}Pass ✅{% else %}FAIL ❌{% endif %} |
| Content missing from its course |
{% assign failures = "" |
split: "" %}{% for course in site.courses %}{% if course.layout == "multipartcourse" %}{% continue %}{% endif %} {% assign allcc = site.content |
| {% if site.partial_build %} |
Partial build filters useless stuff |
{% assign torem = "" |
{% for c in torem %} - {{ c.path }}
{% endfor %}```
{% endif %}.{% endif %}