Socket
Book a DemoInstallSign in
Socket

@threenine/nuxstr-comments

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@threenine/nuxstr-comments

Nuxstr Comments

latest
Source
npmnpm
Version
1.2.3
Version published
Maintainers
1
Created
Source

Nuxstr Comments

npm version npm downloads License Nuxt

Nuxstr Comments for doing amazing things.

Features

  • Nostr-powered comments for Nuxt Content blog posts
  • NIP-07 login prompt if user is not authenticated
  • Comments are written in Markdown and rendered via @nuxt/content's ContentRendererMarkdown
  • Configurable relay list and tagging strategy

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add @threenine/nuxstr-comments

That's it! You can now use Nuxstr Comments in your Nuxt app ✨

Usage

  • Ensure @nuxt/content is enabled and your blog post pages use ContentDoc or render content files.
  • Add the comments component where you want comments to appear (usually below a ContentDoc):
<template>
  <div>
    <ContentDoc />
    <NuxstrComments />
  </div>
</template>

By default, the component tags comments by the current route path (e.g., content:/blog/my-post) and fetches them from configured relays.

  • Configuration (nuxt.config.ts):
export default defineNuxtConfig({
  modules: [
    '@nuxt/content',
    '@threenine/nuxstr-comments',
  ],
  nuxstrComments: {
    relays: ['wss://relay.damus.io', 'wss://relay.nostr.band'],
    tagStrategy: 'path',
    tagPrefix: 'content:',
  },
})

When a user attempts to post, they will be prompted to log in with their Nostr browser extension (NIP-07). Comments are published as kind:1 notes tagged with a t tag containing the content tag (e.g., content:/blog/my-post). Rendering of comment bodies uses @nuxt/content's ContentRendererMarkdown component so users can write markdown.

Contribution

Local development
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release

FAQs

Package last updated on 02 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts