Skip to content

Commit

Permalink
fix: check marketplace
Browse files Browse the repository at this point in the history
  • Loading branch information
mjun0812 committed Mar 4, 2023
1 parent 6c182cc commit 840d642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = async ({ markdownAST }, pluginOptions) => {
if (title !== convertTitle) {
return
}
if (url.indexOf(marketplace) === -1) {
if (url.indexOf(marketplace.replace("www.", "")) === -1) {
return
}

Expand Down Expand Up @@ -56,7 +56,7 @@ const getHTML = (title, imageUrl, url, marketplace) => {
<a class="amazon-card-container" href="${url}">
<div class="amazon-card-body">
<div class="amazon-card-title">${title}</div>
<div class="amazon-card-domain">${marketplace}</div>
<div class="amazon-card-domain">${marketplace.replace("www.", "")}</div>
</div>
<div class="amazon-card-image-container" >
<img class="amazon-card-image" src="${imageUrl}" loading="lazy" alt="${title}-image" />
Expand Down

0 comments on commit 840d642

Please sign in to comment.