Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Support Iconize Plugin #400

Closed
acrylicus opened this issue Sep 22, 2024 · 6 comments
Closed

[Feature request] Support Iconize Plugin #400

acrylicus opened this issue Sep 22, 2024 · 6 comments

Comments

@acrylicus
Copy link
Contributor

acrylicus commented Sep 22, 2024

Is your feature request related to a problem? Please describe.

My job requires a lot of multicloud, unfortunately a lot of the terminology is shared across cloud providers (I.e. VPC in both GCP + AWS). So I use Iconize to keep track of things for quick-glance stuff, i.e. the AWS icon for VPC is very different to the GCP icon for VPC. Currently omnisearch does not include the icons

Describe the solution you'd like

To give you an idea, this is how I have my notes structured:
image

But in the search they all show up like this

image

Would be great if it looked like this
image

Describe alternatives you've considered

For now I just read the file path to work it out, which is fine, but having the actual icon show up would be great

Additional context

Screenshots above.

To be clear its not just VPC, there are lots of examples (i.e. AWS Privatelink, Azure Privatelink, IAM is used on all 3, Load balancers, KMS etc etc)

@acrylicus
Copy link
Contributor Author

@scambier any chance you can weigh in on whether you think this is something you will put some time into? I can have a crack at it if not (though I am a shit coder lol)

@scambier
Copy link
Owner

Iconize has a work-in-progress API, which looks like it doesn't (yet?) have a function to get an icon from a path: see here and there.

It's certainly possible to do without it - basically replicate what Iconize is doing -, but I'd rather rely on a stable API.

@acrylicus
Copy link
Contributor Author

Good spot @scambier - I will keep my eyes peeled for the release of the API. Looks to be coming soon from their most recent commit.

@acrylicus
Copy link
Contributor Author

Hi @scambier - in lieu of the API can we not just use the data.json file in the plugin folder?

❯ cat data.json | head -40
{
  "settings": {
    "migrated": 6,
    "iconPacksPath": ".obsidian/icons",
    "fontSize": 16,
    "emojiStyle": "native",
    "iconColor": null,
    "recentlyUsedIcons": [
      "AwResAmazonVPCEndpoints48",
      "AwResAmazonVPCNetworkAccessAnalyzer48",
      "AwResAmazonVPCReachabilityAnalyzer48",
      "LiWheat",
      "LiCandyCane"
    ],
    "recentlyUsedIconsSize": 5,
    "rules": [],
    "extraMargin": {
      "top": 0,
      "right": 4,
      "bottom": 0,
      "left": 0
    },
    "iconInTabsEnabled": true,
    "iconInTitleEnabled": true,
    "iconInTitlePosition": "inline",
    "iconInFrontmatterEnabled": true,
    "iconInFrontmatterFieldName": "icon",
    "iconColorInFrontmatterFieldName": "iconColor",
    "iconsBackgroundCheckEnabled": true,
    "iconsInNotesEnabled": true,
    "iconsInLinksEnabled": true,
    "iconIdentifier": ":",
    "lucideIconPackType": "native",
    "debugMode": false
  },
  "Project Notes/Customers": "OcPersonFill16",
  "Tech Notes/GCP": "SiGooglecloud",
  "Tech Notes/Fortinet": "SiFortinet",
  "Tech Notes/Azure": "SiMicrosoftazure",
  "Tech Notes/AWS": "FabAws",
<...>
❯ cat data.json | tail -20
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Reachability Analyzer.md": {
    "iconName": "AwResAmazonVPCReachabilityAnalyzer48"
  },
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Network Access Analyzer.md": {
    "iconName": "AwResAmazonVPCNetworkAccessAnalyzer48"
  },
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Endpoints": "AwResAmazonVPCEndpoints48",
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Endpoints/Endpoints Overview.md": {
    "iconName": "AwResAmazonVPCEndpoints48"
  },
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Endpoints/Gateway Endpoints.md": {
    "iconName": "AwResAmazonVPCEndpoints48"
  },
  "Tech Notes/AWS/Networking & Content Delivery/VPC/Endpoints/Interface Endpoints.md": {
    "iconName": "AwResAmazonVPCEndpoints48"
  }
}%

@acrylicus
Copy link
Contributor Author

I have managed to get this working :)

image

I have created a pull request here #405

@scambier
Copy link
Owner

scambier commented Oct 10, 2024

Merged and published in beta, thank you.

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

No branches or pull requests

2 participants