mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
fix: parse featured field from display.featured in collections
The collection YAML files have featured nested under display object, not at the top level. Updated generate-website-data.mjs to check both data.featured and data.display?.featured.
This commit is contained in:
@@ -400,12 +400,15 @@ function generateCollectionsData() {
|
||||
const tags = data.tags || [];
|
||||
tags.forEach((t) => allTags.add(t));
|
||||
|
||||
// featured can be at top level or nested under display
|
||||
const featured = data.featured || data.display?.featured || false;
|
||||
|
||||
collections.push({
|
||||
id: file.replace(".collection.yml", ""),
|
||||
name: data.name || file.replace(".collection.yml", ""),
|
||||
description: data.description || "",
|
||||
tags: tags,
|
||||
featured: data.featured || false,
|
||||
featured: featured,
|
||||
items: (data.items || []).map((item) => ({
|
||||
path: item.path,
|
||||
kind: item.kind,
|
||||
|
||||
Reference in New Issue
Block a user