File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,19 @@ def ready(self) -> None:
28
28
# Strip `.md` file extension from filename and split it into the
29
29
# date (for sorting) and slug (for linking).
30
30
key , slug = path .name [:- 3 ].split ("_" )
31
+
32
+ icon_color = metadata .get ("icon_color" )
33
+ # Use the pydis blurple as the default background color.
34
+ if not icon_color or metadata ["icon" ] == "pydis" :
35
+ icon_color = "has-background-primary"
36
+
31
37
entry = {
32
38
"key" : key ,
33
39
"slug" : slug ,
34
40
"title" : metadata ["title" ],
35
41
"date" : metadata ["date" ],
36
42
"icon" : metadata ["icon" ],
37
- # This key might not be used if the icon uses the pydis logo.
38
- "icon_color" : metadata .get ("icon_color" ),
43
+ "icon_color" : icon_color ,
39
44
"content" : html ,
40
45
}
41
46
You can’t perform that action at this time.
0 commit comments