@@ -53,11 +53,9 @@ def check_indexOverflow(meta_to_check):
53
53
failures = []
54
54
for meta in meta_to_check :
55
55
# Check #4 - are there posts with order > 5 and 'page_type: example_index'?
56
- if "display_as" in meta and meta ["display_as" ] in categories :
57
- if "language" in meta and meta ["language" ] in languages :
58
- if "order" in meta and meta ["order" ] > 5 :
59
- if "page_type" in meta and meta ["page_type" ] == "example_index" :
60
- failures .append (meta ["permalink" ])
56
+ if "order" in meta and meta ["order" ] > 5 :
57
+ if "page_type" in meta and meta ["page_type" ] == "example_index" :
58
+ failures .append (meta ["permalink" ])
61
59
return "are there posts with order > 5 and 'page_type: example_index'?" , failures
62
60
63
61
@@ -66,9 +64,7 @@ def check_postsWithNoThumbnail(meta_to_check):
66
64
for meta in meta_to_check :
67
65
# Check #5 - does every post have a thumbnail?
68
66
if "thumbnail" not in meta :
69
- if "display_as" in meta and meta ["display_as" ] in categories :
70
- if "language" in meta and meta ["language" ] in languages :
71
- failures .append (meta ["permalink" ])
67
+ failures .append (meta ["permalink" ])
72
68
return "does every post have a thumbnail?" , failures
73
69
74
70
@@ -108,7 +104,10 @@ def check_noTrailingSlash(meta_to_check):
108
104
for path in paths :
109
105
post = frontmatter .load (str (path ))
110
106
if len (post .metadata .keys ()) > 0 and "jupyter" not in post .metadata :
111
- meta_to_check .append (post .metadata )
107
+ meta = post .metadata
108
+ if "display_as" in meta and meta ["display_as" ] in categories :
109
+ if "language" in meta and meta ["language" ] in languages :
110
+ meta_to_check .append (meta )
112
111
113
112
114
113
print ("Begin CI Checks!\n " )
0 commit comments