From a53a959d6948f54e047d8302927bc4a8d4ae8b81 Mon Sep 17 00:00:00 2001 From: Gabriel Cozma Date: Sat, 4 May 2024 13:08:17 +0300 Subject: [PATCH] feat: Add ActivityPub support for comments --- CHANGELOG.md | 2 + components/BlogFooter.vue | 37 +++------- components/GiscusComments.vue | 30 ++++++++ components/MastodonComments.vue | 123 ++++++++++++++++++++++++++++++++ package.json | 3 +- pnpm-lock.yaml | 8 +++ 6 files changed, 176 insertions(+), 27 deletions(-) create mode 100644 components/GiscusComments.vue create mode 100644 components/MastodonComments.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f1e908..b36e920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ ### Feature(s) +- Add ActivityPub support for comments (now you can choose between `activitypub` and `giscus`) + - Provide a `title` for the navigation icons to improve accessibility - Add two new types of links (`external` and `internal`) with different icons at the end of the link diff --git a/components/BlogFooter.vue b/components/BlogFooter.vue index 864fbba..b577e84 100644 --- a/components/BlogFooter.vue +++ b/components/BlogFooter.vue @@ -4,7 +4,10 @@

Comments

If you have any questions or comments about this post, please feel free to - leave a comment below. + leave a comment belowon this post.

-
+ +

@@ -40,31 +46,10 @@ diff --git a/package.json b/package.json index a7613db..3bc2687 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aplos", - "version": "1.4.0-2", + "version": "1.4.0-3", "type": "module", "description": "A sleek, contemporary, and purposefully designed VitePress theme", "main": "index.ts", @@ -16,6 +16,7 @@ "license": "MIT", "dependencies": { "@csstools/normalize.css": "^12.1.1", + "@oom/mastodon-comments": "^0.2.2", "inter-ui": "^4.0.2", "non.geist": "^1.0.2", "sass": "^1.74.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b79b90f..8601c93 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@csstools/normalize.css': specifier: ^12.1.1 version: 12.1.1 + '@oom/mastodon-comments': + specifier: ^0.2.2 + version: 0.2.2 inter-ui: specifier: ^4.0.2 version: 4.0.2 @@ -26,6 +29,9 @@ packages: '@csstools/normalize.css@12.1.1': resolution: {integrity: sha512-YAYeJ+Xqh7fUou1d1j9XHl44BmsuThiTr4iNrgCQ3J27IbhXsxXDGZ1cXv8Qvs99d4rBbLiSKy3+WZiet32PcQ==} + '@oom/mastodon-comments@0.2.2': + resolution: {integrity: sha512-OxVglTylzcisUZ8ibx6R3196C0qpqM0vPD6jJ5FfKb0WLM7pePDG/2dVMpmhRdJE2cqnA8nqEAa3Y2E3SXwYCw==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -110,6 +116,8 @@ snapshots: '@csstools/normalize.css@12.1.1': {} + '@oom/mastodon-comments@0.2.2': {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0