···11# Comments
2233-Sequoia has a small UI trick up its sleve that lets you easily display comments on your blog posts through Bluesky posts. This is the general flow:
33+Sequoia has a small UI trick up its sleeve that lets you easily display comments on your blog posts through Bluesky posts. This is the general flow:
4455-1. Setup your blog with `sequoia init`, and when prompted at the end to enable BlueSky posts, select `yes`.
66-2. When you run `sequoia pubish` the CLI will publish a BlueSky post and link it to your `site.standard.document` record for your post.
77-3. As people reply to the BlueSky post, the replies can be rendered as comments below your post using the Sequoia UI web component.
55+1. Setup your blog with `sequoia init`, and when prompted at the end to enable BlueSky posts, select `yes`.
66+2. When you run `sequoia publish` the CLI will publish a BlueSky post and link it to your `site.standard.document` record for your post.
77+3. As people reply to the BlueSky post, the replies can be rendered as comments below your post using the Sequoia UI web component.
8899## Setup
1010···1414sequoia add sequoia-comments
1515```
16161717-Then in your HTML or blog post template, import the component with a script tag or module import.
1717+The web component will look for the `<link rel="site.standard.document" href="atUri"/>` in your HTML head, then using the `atUri` fetch the post and the replies.
18181919-```html
1919+::::tip
2020+For more information on the `<link>` tags, check out the [verification guide](/verifying)
2121+::::
2222+2323+## Usage
2424+2525+Since `sequoia-comments` is a standard Web Component, it works with any framework. Choose your setup below:
2626+2727+:::code-group
2828+2929+```html [HTML]
2030<body>
2131 <h1>Blog Post Title</h1>
2232 <!--Content-->
2333 <h2>Comments</h2>
2424-2525- <sequoia-comments></sequoia-comments> // [!code focus]
2626- <script type="module" src="./src/components/sequoia-comments.js"></script> // [!code focus]
2727-3434+3535+ <sequoia-comments></sequoia-comments>
3636+ <script type="module" src="./src/components/sequoia-comments.js"></script>
2837</body>
2929-</html>
3838+```
3939+4040+```tsx [React]
4141+// Import the component (registers the custom element)
4242+import './components/sequoia-comments.js';
4343+4444+function BlogPost() {
4545+ return (
4646+ <article>
4747+ <h1>Blog Post Title</h1>
4848+ {/* Content */}
4949+ <h2>Comments</h2>
5050+ <sequoia-comments />
5151+ </article>
5252+ );
5353+}
3054```
31553232-The web components will look for the `<link rel="site.standard.document" href="atUri"/>` in your HTML head, then using the `atUri` fetch the post and the replies.
5656+```vue [Vue]
5757+<script setup>
5858+import './components/sequoia-comments.js';
5959+</script>
33603434-::::tip
3535-For more information on the `<link>` tags, check out the [verification guide](/verifying)
3636-::::
6161+<template>
6262+ <article>
6363+ <h1>Blog Post Title</h1>
6464+ <!-- Content -->
6565+ <h2>Comments</h2>
6666+ <sequoia-comments />
6767+ </article>
6868+</template>
6969+```
7070+7171+```svelte [Svelte]
7272+<script>
7373+ import './components/sequoia-comments.js';
7474+</script>
7575+7676+<article>
7777+ <h1>Blog Post Title</h1>
7878+ <!-- Content -->
7979+ <h2>Comments</h2>
8080+ <sequoia-comments />
8181+</article>
8282+```
8383+8484+```astro [Astro]
8585+<article>
8686+ <h1>Blog Post Title</h1>
8787+ <!-- Content -->
8888+ <h2>Comments</h2>
8989+ <sequoia-comments />
9090+ <script>
9191+ import './components/sequoia-comments.js';
9292+ </script>
9393+</article>
9494+```
9595+9696+:::
9797+9898+### TypeScript Support
9999+100100+If you're using TypeScript with React, add this type declaration to avoid JSX errors:
101101+102102+```ts [custom-elements.d.ts]
103103+declare namespace JSX {
104104+ interface IntrinsicElements {
105105+ 'sequoia-comments': React.DetailedHTMLProps<
106106+ React.HTMLAttributes<HTMLElement> & {
107107+ 'document-uri'?: string;
108108+ depth?: string | number;
109109+ },
110110+ HTMLElement
111111+ >;
112112+ }
113113+}
114114+```
115115+116116+### Vue Configuration
117117+118118+For Vue, you may need to configure the compiler to recognize custom elements:
119119+120120+```ts [vite.config.ts]
121121+export default defineConfig({
122122+ plugins: [
123123+ vue({
124124+ template: {
125125+ compilerOptions: {
126126+ isCustomElement: (tag) => tag === 'sequoia-comments'
127127+ }
128128+ }
129129+ })
130130+ ]
131131+});
132132+```
3713338134## Configuration
39135