Skip to content

Commit b734bf9

Browse files
committed
feat: allow target attribute in links for listing items
1 parent bdc06e0 commit b734bf9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/project/types/website/listing/website-listing-template.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ export function reshapeListing(
404404
const value = val || item[field] || " ";
405405
const path = item.path;
406406
if (path && value !== undefined && fieldLinks.includes(field)) {
407-
return `<a href="${path}" class="${field}${
407+
const targetAttr = item.target ? ` target="${item.target}"` : "";
408+
return `<a href="${path}"${targetAttr} class="${field}${
408409
clz ? ` ${clz}` : ""
409410
}">${value}</a>`;
410411
} else {

0 commit comments

Comments
 (0)