From 582c1686bfe7ad0cb36d9a692d5b07d9045c6bcf Mon Sep 17 00:00:00 2001 From: Tyler Sticka Date: Thu, 14 Jul 2022 15:02:03 -0700 Subject: [PATCH] Fix comment permalinks --- .changeset/smart-windows-buy.md | 5 +++++ src/components/comment/comment.test.ts | 1 - src/components/comment/comment.twig | 2 +- src/components/comment/demo/data.ts | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changeset/smart-windows-buy.md 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 @@