diff --git a/src/components/Comments.astro b/src/components/Comments.astro index c0c25bd..7ab4a69 100644 --- a/src/components/Comments.astro +++ b/src/components/Comments.astro @@ -1,6 +1,7 @@ --- import {siteConfig} from "../config"; import FediverseComments from "./helper/comments/Fediverse.astro"; +import HatsuComments from "./helper/comments/Hatsu.astro"; const method = siteConfig.comments.type const ArtalkConfig = siteConfig.comments.artalk @@ -52,3 +53,4 @@ let { path='/' } = Astro.props; {(method === 'fediverse' && !FediverseConfig.renderOnServer ) && } {(method === 'fediverse' && FediverseConfig.renderOnServer ) &&

Loading comments...

} +{method === 'hatsu' && } \ No newline at end of file diff --git a/src/components/helper/comments/Hatsu.astro b/src/components/helper/comments/Hatsu.astro new file mode 100644 index 0000000..42d5aa4 --- /dev/null +++ b/src/components/helper/comments/Hatsu.astro @@ -0,0 +1,494 @@ +--- +import {siteConfig} from "../../../config"; +const hatsuHost = `https://${siteConfig.comments.hatsu.instanceDomain}` +const {origin, pathname} = new URL(Astro.url) +const url = new URL(pathname, origin).href + +import { transform } from "ultrahtml"; +import sanitize from "ultrahtml/transformers/sanitize"; +--- +
+

Comments by Hatsu

+

+
+ +
+
+ + \ No newline at end of file