@nuxt-alt/markdown-it

Alternaive module to @nuxtjs/markdownit
6,123 3
Install
npm install @nuxt-alt/markdown-it
Latest Version:0.0.2
Vue:3
License:MIT
Last Updated:Jan 10, 2024
Links: GitHub  ·  npm
Maintainer: teranode

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>

Related Packages

nuxt-markdown-render

A simple, lightweight markdown-it wrapper for Nuxt written in pure typescript.

3,938 11
nuxt-auther

Authentication module for Nuxt.JS

1,609 1
@luewell/nuxt-alt-auth

An alternative module to @nuxtjs/auth

709 113
@nuxt-alt/auth

An alternative module to @nuxtjs/auth

176,945 113
@nuxt-alt/google-analytics

An alternative google analytics 4 module for nuxt3

934 2

Version History

Version Released Vue License
0.0.2 ^3.0 MIT
0.0.1 ^3.0 MIT