Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt-alt/markdown-it

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt-alt/markdown-it

Alternaive module to @nuxtjs/markdownit

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

markdown-it for Nuxt 3

This is an alternaive module for @nuxtjs/markdownit.

Setup

  1. Add the @nuxt-alt/markdown-it dependency to your project
yarn add @nuxt-alt/markdown-it
  1. Add @nuxt-alt/markdown-it to the modules section of nuxt.config.ts
export default defineNuxtConfig({
    modules: [
        '@nuxt-alt/markdown-it'
    ],
    // [optional] markdownit options
    // See https://github.com/markdown-it/markdown-it
    markdownit: {
        preset: 'default',
        linkify: true,
        breaks: true,
        use: [
            'markdown-it-div',
            ['markdown-it-attrs', { ...options }]
        ]
    }
});

Usage

Using $md to render markdown

nuxt.config.ts:

export default defineNuxtConfig({
    modules: [
        '@nuxt-alt/markdown-it'
    ],
    markdownit: {
        runtime: true
    }
});

hello.vue:

<template>
  <div v-html="$md.render(model)"></div>
</template>

<script lang="ts" setup>
const model = '# Hello World!'
</script>

Keywords

FAQs

Package last updated on 10 Jan 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc