An open API service indexing awesome lists of open source software.

https://github.com/khalby786/vue-utterances

Vue.js component for 🔮 utterances 🔮
https://github.com/khalby786/vue-utterances

utterances vite vue vue-component vue-utterances vue3

Last synced: 10 months ago
JSON representation

Vue.js component for 🔮 utterances 🔮

Awesome Lists containing this project

README

          

# vue-utterances

Vue.js component for [Utterances](https://utteranc.es), a lightweight comments widget that uses GitHub issues. Comes with TypeScript support and reactive props.

## Installation

```bash
npm install vue-utterances

# or pnpm, I've been using it lately and its great
pnpm add vue-utterances

# or yarn, if you feel fancy
yarn add vue-utterances
```

## Usage

Import and register the component in your app or page:

```vue

import Utterances from 'vue-utterances';

```

### Nuxt
Wrap with `` to avoid SSR issues:

```vue



```

## Props
| Name | Type | Description |
|-----------|----------|--------------------------------------------------|
| repo | string | GitHub repo in the format `owner/repo` |
| issueTerm | string | Issue mapping term (e.g., pathname, url, title) |
| theme | string | Utterances theme |
| label | string | Label for created issues |

## Methods
Expose `reload()` to reload the widget if needed:

```js
const utterancesRef = ref();
utterancesRef.value.reload();
```

## Development

Build the library:
```bash
npm run build
```

Test locally in another app:
```bash
npm link

# In your test app:
npm link vue-utterances
```

## License
[MIT](https://github.com/khalby786/vue-utterances/blob/main/LICENSE)

## Credits

- [Utterances](https://utteranc.es/) - The original comments widget
- [How to Create and Publish a Vue Component Library – Update](https://www.freecodecamp.org/news/how-to-add-comments-to-your-vue-js-app-with-utterances/)
- [jet-ui](https://github.com/sjmc11/jet-ui)