https://github.com/fastcomments/fastcomments-vue
A Vue Component for FastComments
https://github.com/fastcomments/fastcomments-vue
Last synced: 7 months ago
JSON representation
A Vue Component for FastComments
- Host: GitHub
- URL: https://github.com/fastcomments/fastcomments-vue
- Owner: FastComments
- License: mit
- Created: 2020-10-01T05:12:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T02:20:34.000Z (9 months ago)
- Last Synced: 2025-05-06T18:06:57.670Z (7 months ago)
- Language: Vue
- Size: 4.18 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-vue - fastcomments-vue - A Vue Component for FastComments ` 📝 8 days ago` (UI Components [🔝](#readme))
- awesome-vue - fastcomments-vue - 💬 A Vue component for FastComments, a live commenting system. (Components & Libraries / UI Components)
README
# fastcomments-vue
> A Vue library for FastComments, a fast and developer friendly comment system.
[](https://www.npmjs.com/package/fastcomments-vue) [](https://standardjs.com)
For Vue 3.0, see [fastcomments-vue-next](https://github.com/fastcomments/fastcomments-vue-next).
## Installation
### NPM
```bash
npm install --save fastcomments-vue
```
### Yarn
```bash
yarn add fastcomments-vue
```
## Usage
### The Comment Widget
The FastCommentsVue component contains the live FastComments comment widget.
Replace "demo" below with your "tenantId" - available [here](https://fastcomments.com/auth/my-account/api) in the FastComments admin area.
The widget supports a lot of options - see FastCommentsConfig [here](https://github.com/FastComments/fastcomments-typescript/blob/main/src/fast-comments-comment-widget-config.ts).
```vue
import Vue from 'vue';
import FastCommentsVue from 'fastcomments-vue';
export default Vue.extend({
name: 'ServeDev',
components: {
FastCommentsVue
}
});
```
## Updating The Current Page (SPA Example)
In FastComments we call the article id, or page the comments get tied to, the URL ID as it can be a url or an ID.
Define the URL ID in the following manner. The component watches for changes in config object, and will reload, so you can just update the "url" and "urlId" settings.
See a full working example [here](dev/serve-pagination.ts).
Run the pagination example via:
```
npm run serve-pagination
```
```vue
```
### Account Region (ATTENTION: EU Customers)
If your account is located in the EU, set `region = 'eu'` in the widget configuration, for example:
```vue
```
Otherwise, you do not have to define `region`.
## In Production
You probably don't want to define the config inline if you're passing callbacks etc. Instead, you'll want to define
the config in a `computed` block, otherwise each time your callback etc is invoked the entire widget will re-render.
[See the spinner example for how to do this.](./dev/serve-spinner.vue)
## Contributing
Please check out our [contribution guidelines](CONTRIBUTING.md) before starting on a change. Remember to communicate first!
## License
MIT © [winrid](https://github.com/winrid)