diff --git a/images/blog/kerchunk/kerchunk_image.png b/images/blog/kerchunk/kerchunk_image.png new file mode 100644 index 0000000..e93b733 Binary files /dev/null and b/images/blog/kerchunk/kerchunk_image.png differ diff --git a/src/components/BlogPost.tsx b/src/components/BlogPost.tsx index 5f1d4d6..5a9b41c 100644 --- a/src/components/BlogPost.tsx +++ b/src/components/BlogPost.tsx @@ -20,9 +20,25 @@ export const BlogPost = () => {

{post.title}

-
- {post.date} - {post.readTime} +
+
+ {post.date} + {post.readTime} +
+ {post.keywords?.length > 0 && ( +
+ {post.keywords + .filter(keyword => keyword && keyword.trim()) + .map((keyword, index) => ( + + {keyword.trim()} + + ))} +
+ )}
- item.trim().replace(/^["'](.*)["']$/, '$1') // Remove quotes - .replace(/^[-\s]*/, '') // Remove leading dash and spaces - .trim() - ); + if (currentKey === 'keywords') { + data[currentKey] = arrayItems.map(item => + item.trim() + .replace(/^[-\s]*/, '') // Remove leading dash and spaces + .replace(/["']/g, '') // Remove all quotes + .replace(/,\s*$/, '') // Remove trailing commas + .trim() + ).filter(item => item !== ''); // Remove empty items + } else { + data[currentKey] = arrayItems.map(item => + item.trim() + .replace(/^["'](.*)["']$/, '$1') // Remove quotes + .replace(/^[-\s]*/, '') // Remove leading dash and spaces + .replace(/,\s*$/, '') // Remove trailing commas + .trim() + ).filter(item => item !== ''); // Remove empty items + } isInArray = false; currentKey = null; arrayItems = [];