{"id":15313877,"url":"https://github.com/itsdouges/armory-embeds","last_synced_at":"2025-07-11T05:37:51.950Z","repository":{"id":25735640,"uuid":"105614154","full_name":"itsdouges/armory-embeds","owner":"itsdouges","description":"🛡 Embed Guild Wars 2 widgets on your site!","archived":false,"fork":false,"pushed_at":"2024-02-20T21:36:27.000Z","size":6652,"stargazers_count":43,"open_issues_count":3,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T13:44:47.104Z","etag":null,"topics":["embed","guildwars2","gw2"],"latest_commit_sha":null,"homepage":"https://madou.github.io/armory-embeds","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsdouges.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-03T04:25:32.000Z","updated_at":"2024-08-01T09:46:37.000Z","dependencies_parsed_at":"2024-10-15T21:01:02.220Z","dependency_job_id":"e8937848-9380-4588-93d9-9fc6dc80c9b2","html_url":"https://github.com/itsdouges/armory-embeds","commit_stats":{"total_commits":76,"total_committers":5,"mean_commits":15.2,"dds":"0.14473684210526316","last_synced_commit":"246584f515295dc80748f5b35933fc6a33a8fe37"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Farmory-embeds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Farmory-embeds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Farmory-embeds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Farmory-embeds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsdouges","download_url":"https://codeload.github.com/itsdouges/armory-embeds/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991539,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embed","guildwars2","gw2"],"created_at":"2024-10-01T08:43:30.476Z","updated_at":"2025-04-15T01:50:20.893Z","avatar_url":"https://github.com/itsdouges.png","language":"JavaScript","readme":"# [armory-embeds](https://github.com/madou/armory-embeds)\n\n[![NPM version](http://img.shields.io/npm/v/armory-embeds.svg?style=flat-square)](https://www.npmjs.com/package/armory-embeds)\n[![NPM downloads](http://img.shields.io/npm/dm/armory-embeds.svg?style=flat-square)](https://www.npmjs.com/package/armory-embeds)\n[![Discord](https://img.shields.io/badge/discord-GW2Armory-blue.svg)](https://discord.gg/3BRbV7b)\n\nGuild Wars 2 Armory is arming the GW2 community with powered up embeds for items, \nskills, \nand more. \n\nWant something more low level? Want to integrate directly with your React app instead of this high level abstraction?\nCheck out the [`armory-ui-components`](https://github.com/madou/armory-component-ui) library.\n\n## Usage\n\nFirst add the embeds to your html:\n\n```html\n\u003cbody\u003e\n  \u003cdiv data-armory-embed=\"skills\" data-armory-ids=\"5507,5508,5510,5515\"\u003e\u003c/div\u003e\n\u003c/body\u003e\n```\n\nThen add the embed script after them:\n\n```html\n\u003cscript async src=\"https://unpkg.com/armory-embeds@^0.x.x/armory-embeds.js\"\u003e\u003c/script\u003e\n```\n\nWhen the document has fully loaded the embeds will then be loaded.\n\nNote the semvar range. When breaking changes are introduced, this will be incremented by one every time. For example from `@^0.x.x` to `@^1.x.x`.\n\n## Supplementary Libraries\n\n- [armory-embeds-chat-codes](https://github.com/madou/armory-embeds-chat-code) - parses an ingame chat code to armory embed markup.\n\n## [Options](https://madou.github.io/armory-embeds/?selectedKind=options)\n\n### Global Settings\n\nEntirely optional.\n\nCreate an object on the document object named `GW2A_EMBED_OPTIONS`. See below for an example.\nMake sure the assign this config _before_ declaring the `gw2a` script.\n\n| prop | type | required | description |\n|-|-|-|-|\n| lang | string | no | The language the embeds will be loaded in. Supported values are: en, fr, de, es, zh, ru |\n| persistToLocalStorage | boolean | no | Turns data persistence on or off. Default to true. |\n| forceCacheClearOnNextRun | string | no | Forces data cache to be cleared. Use wisely. Use a unique key every time you want to clear the cache. |\n\n```javascript\ndocument.GW2A_EMBED_OPTIONS = {\n  lang: 'en',\n  persistToLocalStorage: true,\n  forceCacheClearOnNextRun: '1',\n};\n```\n\n### Styles\n\nEach embed has a class that you can target, each class follows the pattern `.gw2a-{EMBED_NAME}-embed`.\n\n```css\n.gw2a-character-embed {}\n.gw2a-skills-embed {}\n.gw2a-items-embed {}\n.gw2a-amulets-embed {}\n.gw2a-traits-embed {}\n.gw2a-specializations-embed {}\n```\n\n## Embeds\n\n### [Skills](https://madou.github.io/armory-embeds/?selectedKind=Skills)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6801309/30039214-7078b6c4-9211-11e7-8d93-b93f870fc032.png\" width=\"400\" /\u003e\n\n```html\n\u003cdiv\n  data-armory-embed=\"skills\"\n  data-armory-ids=\"5507,5508,5510,5515\"\u003e\n\u003c/div\u003e\n\n\u003cdiv\n  data-armory-embed=\"skills\"\n  data-armory-ids=\"5508,332211,5510,-1\"\n  data-armory-size=\"40\"\n  data-armory-blank-text=\"This can be replaced with any text!\"\n\u003e\n\u003c/div\u003e\n```\n\n| attribute | value | required | description |\n|-|-|-|-|\n| data-armory-embed | skills | yes | |\n| data-armory-ids | numbers delimited by commas | yes | The skill ids you want to load. If you pass `-1` you will load an empty box instead of the skill. |\n| data-armory-size | number | no | The size of each skill in the embed. |\n| data-armory-blank-text | string | no | When loading an skill of id `-1` you can override the tooltip text to be whatever you want. |\n| data-armory-inline-text | string | no | Optional inline text that will be displayed to the right of the icon. You can pass in `wiki` to use a gw2 wiki URL, or pass in any other text that will be used as the link. |\n\n### [Items](https://madou.github.io/armory-embeds/?selectedKind=Items)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6801309/30039226-84ce7dc0-9211-11e7-9df7-693fb8921300.png\" width=\"400\" /\u003e\n\n```html\n\u003cdiv\n  data-armory-embed=\"items\"\n  data-armory-blank-text=\"Some other text can go here!\"\n  data-armory-size=\"60\"\n  data-armory-ids=\"24836,-1,74412,46774,39620,1379\"\n  data-armory-1379-upgrades=\"24615,24815\"\n  data-armory-1379-upgrade-count=\"{\\\"24815\\\": 3}\"\n  data-armory-1379-infusions=\"49426,49426\"\n\u003e\n\u003c/div\u003e\n\n\u003cdiv\n  data-armory-embed=\"items\"\n  data-armory-ids=\"77482\"\n  data-armory-77482-stat=\"656\"\n\u003e\n\u003c/div\u003e\n```\n\n| attribute | value | required | description |\n|-|-|-|-|\n| data-armory-embed | items | yes | |\n| data-armory-ids | numbers delimited by commas | yes | The item ids you want to load. If you pass `-1` you will load an empty box instead of the item. |\n| data-armory-size | number | no | The size of each item in the embed. |\n| data-armory-blank-text | string | no | When loading an item of id `-1` you can override the tooltip text to be whatever you want. |\n| data-armory-{ITEM_ID}-stat | number | no | Loads the item with the stat of choice. |\n| data-armory-{ITEM_ID}-skin | number | no | Loads the item with the skin of choice. |\n| data-armory-{ITEM_ID}-upgrades | number | no | Loads the item with the upgrades of choice. |\n| data-armory-{ITEM_ID}-infusions | number | no | Loads the item with the infusions of choice. |\n| data-armory-{ITEM_ID}-upgrade-count | stringified `{ [number]: number }` | no | Sets the upgrade counts. |\n| data-armory-inline-text | string | no | Optional inline text that will be displayed to the right of the icon. You can pass in `wiki` to use a gw2 wiki URL, `gw2spidy` to use a gw2spidy URL, or pass in any other text that will be used as the link. |\n\n### [Specializations](https://madou.github.io/armory-embeds/?selectedKind=Specializations)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6801309/30039237-9ba20c1a-9211-11e7-8e57-8b2efffe5304.png\" width=\"400\" /\u003e\n\n```html\n\u003cdiv\n  data-armory-embed=\"specializations\"\n  data-armory-ids=\"3,332211\"\n  data-armory-3-traits=\"1761,1774,1749\"\n\u003e\n\u003c/div\u003e\n```\n\n| attribute | value | required | description |\n|-|-|-|-|\n| data-armory-embed | specializations | yes | |\n| data-armory-ids | numbers delimited by commas | yes | The specialization ids you want to load. |\n| data-armory-{SPEC_ID}-traits | numbers delimited by commas | no | Traits you want to select for the specialization. Entirely optional, you can select any combination. |\n\n### [Traits](https://gw2armory.com/embeds#traits)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6801309/30039240-abca384c-9211-11e7-8f04-f90127747c8b.png\" width=\"400\" /\u003e\n\n```html\n\u003cdiv\n  data-armory-embed=\"traits\"\n  data-armory-ids=\"820,-1,1694\"\n  data-armory-blank-text=\"This could be anything you want!\"\n\u003e\n\u003c/div\u003e\n```\n\n| attribute | value | required | description |\n|-|-|-|-|\n| data-armory-embed | traits | yes | |\n| data-armory-ids | numbers delimited by commas | yes | The trait ids you want to load. If you pass `-1` you will load an empty box instead of the trait. |\n| data-armory-size | number | no | The size of each trait in the embed. |\n| data-armory-blank-text | string | no | When loading an trait of id `-1` you can override the tooltip text to be whatever you want. |\n| data-armory-inline-text | string | no | Optional inline text that will be displayed to the right of the icon. You can pass in `wiki` to use a gw2 wiki URL, or pass in any other text that will be used as the link. |\n\n### [Amulets](https://madou.github.io/armory-embeds/?selectedKind=Amulets)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6801309/30039246-bb506ffc-9211-11e7-981e-1fa5d62342a7.png\" width=\"400\" /\u003e\n\n```html\n\u003cdiv\n  data-armory-embed=\"amulets\"\n  data-armory-ids=\"332211,-1\"\n  data-armory-size=\"30\"\n  data-armory-blank-text=\"This is a blank space!\"\n\u003e\n\u003c/div\u003e\n\n```\n\n| attribute | value | required | description |\n|-|-|-|-|\n| data-armory-embed | amulets | yes | |\n| data-armory-ids | numbers delimited by commas | yes | The amulet ids you want to load. If you pass `-1` you will load an empty box instead of the amulet. |\n| data-armory-size | number | no | The size of each amulet in the embed. |\n| data-armory-blank-text | string | no | When loading an amulet of id `-1` you can override the tooltip text to be whatever you want. |\n| data-armory-inline-text | string | no | Optional inline text that will be displayed to the right of the icon. You can pass in `wiki` to use a gw2 wiki URL, or pass in any other text that will be used as the link. |\n\n\n## Finding IDs\n\nUnfortunately you can't pass the embeds the item/skill etc names. You have to pass the specific ids.\n\n### Item IDs\n\nItem IDs are easy enough, go look at https://www.gw2spidy.com.\n\n### Skill/Trait/Specialization IDs\n\nBest bet is to look at the GW2 Wiki, for example: https://wiki.guildwars2.com/wiki/Virtue_of_Justice.\n\n## Who Is Using armory-embeds?\n\n- [MetaBattle](https://metabattle.com) *for builds for all gamemodes in Guild Wars 2*\n- ~~[Quantify](https://qtfy.eu)~~ *Currently Offline*\n- [Le Bus Magique](http://www.lebusmagique.fr) *event-driven french community guild evolving on Guild Wars 2*\n- ~~[mists.co](http://mists.co)~~ *Currently Offline*\n- [Lucky Noobs](https://lucky-noobs.com)  *benchmarks, builds, raids in English and German*\n- ~~[Discretize](http://discretize.eu)~~ *Now uses [discretize-ui](https://github.com/discretize/discretize-ui)*\n- ~~[Abaddons Maul](https://abaddons-maul.de)~~ *Currently Offline*\n- [Chains of the Kraken](https://ctk.enjin.com) *Comming Soon since 2019*\n- [Snow Crows](http://snowcrows.com) *benchmarks, builds, raids, strikes, and dungeons*\n- ~~[SPF Gaming](http://spf-gaming.de/)~~ *Currently Offline*\n- [Accessibility Wars Too](https://accessibilitywars.com/) *Low-Intensity Accessible Builds for Guild Wars 2*\n\n[Don't see your site? Add it in a Pull Request!](https://github.com/madou/armory-react/pulls)\n\n## Troubleshooting\n\nHit [@itsmadou](https://twitter.com/itsmadou) up on twitter, or [post an issue](https://github.com/madou/armory-react/issues) if you think something is a bug.\n\n## Local Development\n\n### Getting started\n\n```sh\ngit clone git@github.com:madou/armory-embeds.git\ncd armory-embeds\nyarn install\nnpm run tdd # Run tests in watch mode\nnpm start # Run react storybook for local development\n```\n\n© 2015-present gw2armory.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdouges%2Farmory-embeds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsdouges%2Farmory-embeds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdouges%2Farmory-embeds/lists"}