diff --git a/.github/workflows/npm_notify_release.yml b/.github/workflows/npm_notify_release.yml
index b5df2d4..8ccca2a 100644
--- a/.github/workflows/npm_notify_release.yml
+++ b/.github/workflows/npm_notify_release.yml
@@ -3,7 +3,7 @@ name: Node.js Public Release Notes
on:
release:
types:
- - created
+ - published
jobs:
test_develop:
diff --git a/content.plugins.js b/content.plugins.js
index 212eb82..1916f5d 100644
--- a/content.plugins.js
+++ b/content.plugins.js
@@ -1,4 +1,5 @@
const { emptyChildren, getComponentName, createComponent, getDescriptionStyles, saveSvgToDisk } = require('./lib');
+const svgtojsx = require('svg-to-jsx');
const contentPlugins = [
applyStyles,
@@ -57,7 +58,7 @@ function renderMask(state) {
async function renderVector(state, shared) {
const { vectors, genClassName, additionalStyles } = shared;
- const { node, content } = state;
+ const { node, props, content } = state;
if (node.type === 'VECTOR' && vectors[node.id] && !node.isMask) {
emptyChildren(state);
@@ -86,10 +87,15 @@ async function renderVector(state, shared) {
additionalStyles.push(additionalSvgStyles);
}
- const fileName = node.id.replace(/\W+/g, '-');
- const url = await saveSvgToDisk(fileName, vectors[node.id], shared);
-
- content.push(`
`);
+ if (Object.keys(props).includes('vectorImg')) {
+ const fileName = node.id.replace(/\W+/g, '-');
+ const url = await saveSvgToDisk(fileName, vectors[node.id], shared);
+ content.push(`
`);
+ } else {
+ let svg = await svgtojsx(vectors[node.id]);
+ svg = svg.replace('