Replies: 3 comments 7 replies
-
Hi, maintaining metadata and all variations for specific needs is hard and we had a lot of discussions about this topic
Where it this file? I can see Also the json file in the free repo is 4.35 Mb Where does the 35MB comes from? |
Beta Was this translation helpful? Give feedback.
-
@zagarskas Not using php, I'm in the Here's how I solved this problem:
import type { CmsCollection } from "netlify-cms-core";
import icons from "@fortawesome/fontawesome-free/metadata/icons.yml"; //1️⃣
import * as Fields from "../Fields";
export const PropertyAttributeCollection: CmsCollection = {
name: "property_attributes",
label: "Property Attributes",
label_singular: "Property Attribute",
folder: "content/property_attributes",
create: true,
slug: "{{title}}",
summary: "[{{id}}] {{date_created | date}}: {{title}}",
sortable_fields: ["title", "date_created"],
fields: [
Fields.Identifier.IDField,
Fields.Date.CreatedField,
Fields.Date.UpdatedField,
Fields.General.TitleField,
{
label: "Plural",
name: "plural",
widget: "string",
},
{
label: "Icon",
name: "icon",
widget: "select",
options: Object.keys(icons), // 2️⃣
hint: "Icon name from https://fontawesome.com/search?o=r&s=solid%2Cregular&f=classic",
},
],
}; |
Beta Was this translation helpful? Give feedback.
-
check the metadata |
Beta Was this translation helpful? Give feedback.
-
Is there a JSON or PHP flat Array out there that just has only the icon identifiers?
Problem:
The 35MB JSON file is not the droid I am looking for
Solution:
The droid I am looking for looks like this:
{ "abacus", "address-book", "alicorn" ect... }
It does not need any taxonomy or categorization.
It does not need to be multi-dimensional.
no additional data about any icon is needed.
Just a flat list of all 3500 unique IDs
(a separate file for brands I think may be needed)
I expect it would be, oh, maybe 35-350kb? (not 35,000kb)
Beta Was this translation helpful? Give feedback.
All reactions