diff --git a/.changeset/smart-windows-buy.md b/.changeset/smart-windows-buy.md new file mode 100644 index 000000000..0b7f9d471 --- /dev/null +++ b/.changeset/smart-windows-buy.md @@ -0,0 +1,5 @@ +--- +'@cloudfour/patterns': patch +--- + +Comment permalinks now resolve to the hash URL of the comment ID rather than a nonexistent Timber `comment.link` property diff --git a/src/components/comment/comment.test.ts b/src/components/comment/comment.test.ts index ea0ea75cf..6cad7b602 100644 --- a/src/components/comment/comment.test.ts +++ b/src/components/comment/comment.test.ts @@ -20,7 +20,6 @@ test( await commentMarkup({ comment: { ID: 1, - link: '#comment-1', date: new Date('January 1 2000'), avatar: '', author: { diff --git a/src/components/comment/comment.twig b/src/components/comment/comment.twig index 5802b3b73..41997eae0 100644 --- a/src/components/comment/comment.twig +++ b/src/components/comment/comment.twig @@ -51,7 +51,7 @@
+ href="#comment-{{comment.ID}}"> {% include '@cloudfour/components/icon/icon.twig' with { name: 'link', diff --git a/src/components/comment/demo/data.ts b/src/components/comment/demo/data.ts index 66b8c0096..4b05ec495 100644 --- a/src/components/comment/demo/data.ts +++ b/src/components/comment/demo/data.ts @@ -90,7 +90,6 @@ export const makeComment = ({ const result = { ID: id, - link: `#comment-${id}`, date: new Date(), avatar: `https://placeimg.com/92/92/${sample(placeImgCategories)}`, author: {