Skip to content

[WIP] Fix icon-pack.json format for Surge compatibility#5

Merged
eric24lu merged 1 commit into
mainfrom
copilot/fix-icon-pack-json-format
Feb 27, 2026
Merged

[WIP] Fix icon-pack.json format for Surge compatibility#5
eric24lu merged 1 commit into
mainfrom
copilot/fix-icon-pack-json-format

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Problem

The icon-pack.json file at https://github.com/eric24lu/IconSVG/blob/main/icon-pack.json currently uses an invalid format for Surge icon sets, causing Surge to display "无效数据" (invalid data).

The current file is a top-level JSON array, but Surge requires a top-level JSON object with name, description, and icons fields.

Current format (❌ invalid for Surge):

[
  {
    "name": "CN",
    "label": "China",
    "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/CN.png"
  },
  ...
]

Required format (✅ valid for Surge):

{
  "name": "IconSVG",
  "description": "Icon Pack",
  "icons": [
    {
      "name": "CN",
      "label": "China",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/CN.png"
    },
    {
      "name": "HK",
      "label": "Hong Kong",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/HK.png"
    },
    {
      "name": "JP",
      "label": "Japan",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/JP.png"
    },
    {
      "name": "SG",
      "label": "Singapore",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/SG.png"
    },
    {
      "name": "US",
      "label": "United States",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/US.png"
    },
    {
      "name": "UN",
      "label": "United Nations",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/UN.png"
    },
    {
      "name": "YouTube",
      "label": "YouTube",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/YouTube.png"
    },
    {
      "name": "bonjour",
      "label": "Bonjour",
      "url": "https://raw.githubusercontent.com/eric24lu/IconSVG/main/bonjour.svg"
    }
  ]
}

Changes needed

  1. Wrap the existing array inside an object with an "icons" key.
  2. Add a top-level "name" field (e.g., "IconSVG").
  3. Add a top-level "description" field (e.g., "Icon Pack").

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@eric24lu eric24lu marked this pull request as ready for review February 27, 2026 15:05
Copilot AI review requested due to automatic review settings February 27, 2026 15:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@eric24lu eric24lu merged commit 666903a into main Feb 27, 2026
1 check failed
Copilot stopped work on behalf of eric24lu due to an error February 27, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants