@coralproject/talk-plugin-custom-asset-id

Custom Asset ID Plugin for The Coral Project's Talk

Stats

StarsIssuesVersionUpdatedCreatedSize
@coralproject/talk-plugin-custom-asset-id
1.1.04 years ago4 years agoMinified + gzip package size for @coralproject/talk-plugin-custom-asset-id in KB

Readme

Talk Plugin Custom ID Assets

:sparkles: Thanks to The Register-Guard for agreeing to open source this plugin. :sparkles:

This plugin is designed to allow the embed for Talk to specify an Asset ID to lookup and if not found create with the given ID and URL. If the ID is not provided however, the url will be used instead and it will fall back to Talk assigning an ID.

Algorithm

Asset ID provided

Attempt to lookup Asset with the given ID, if found, return asset. If the asset is not found, create it with the url.

Asset ID not provided

Attempt to lookup Asset with the url, if found, return asset. If the asset is not found, create it with the url and assign a new ID.

Installation

Simply modify/create the plugins.json file to include it:

{
  "server": [
    // ...
    {"@coralproject/talk-plugin-custom-asset-id": "^1.0.0"},
    // ...
  ],
  "client": [
    // ...
  ]
}

Which will enable it.

License

Talk is released under the Apache License, v2.0.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.