Skip to content

Commit 6ebc0a4

Browse files
committed
Fixed custom color option
1 parent df95662 commit 6ebc0a4

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

dist/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21251,7 +21251,7 @@ async function main() {
2125121251
const category = row.properties[category_schema_entry[0]][0][0];
2125221252
if (!category) throw new Error('Each row must have a category value');
2125321253
const category_value = categories_map.get(category);
21254-
category_value.items.push(row.properties.title[0][0]);
21254+
category_value.items.push(row.properties);
2125521255
});
2125621256

2125721257
const newLines = [];
@@ -21264,9 +21264,13 @@ async function main() {
2126421264
];
2126521265
category_info.items.forEach((item) =>
2126621266
content.push(
21267-
`<img src="https://img.shields.io/badge/-${qs.stringify(item)}-${
21268-
item.properties[color_schema_entry[0]][0][0]
21269-
}?style=flat-square&amp;logo=${qs.stringify(item)}" alt="${item}"/>`
21267+
`<img src="https://img.shields.io/badge/-${qs.stringify(
21268+
item.title[0][0]
21269+
)}-${
21270+
item[color_schema_entry[0]][0][0]
21271+
}?style=flat-square&amp;logo=${qs.stringify(
21272+
item.title[0][0]
21273+
)}" alt="${item.title[0][0]}"/>`
2127021274
)
2127121275
);
2127221276
newLines.push(...content, '<hr>');

src/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function main() {
141141
const category = row.properties[category_schema_entry[0]][0][0];
142142
if (!category) throw new Error('Each row must have a category value');
143143
const category_value = categories_map.get(category);
144-
category_value.items.push(row.properties.title[0][0]);
144+
category_value.items.push(row.properties);
145145
});
146146

147147
const newLines = [];
@@ -154,9 +154,13 @@ async function main() {
154154
];
155155
category_info.items.forEach((item) =>
156156
content.push(
157-
`<img src="https://img.shields.io/badge/-${qs.stringify(item)}-${
158-
item.properties[color_schema_entry[0]][0][0]
159-
}?style=flat-square&amp;logo=${qs.stringify(item)}" alt="${item}"/>`
157+
`<img src="https://img.shields.io/badge/-${qs.stringify(
158+
item.title[0][0]
159+
)}-${
160+
item[color_schema_entry[0]][0][0]
161+
}?style=flat-square&amp;logo=${qs.stringify(
162+
item.title[0][0]
163+
)}" alt="${item.title[0][0]}"/>`
160164
)
161165
);
162166
newLines.push(...content, '<hr>');

0 commit comments

Comments
 (0)