Markdownit and Highlight.js for Nuxt

updated: 04.11.2020

Add packages:

yarn add @nuxtjs/markdownit markdown-it-highlightjs

Add config:

# ~/nuxt.config.js

module.exports = {

  css: [ '~/node_modules/highlight.js/styles/tomorrow-night-eighties.css'],

  modules: [
    '@nuxtjs/markdownit'
  ],

  markdownit: {
    injected: true,
    use: [
      'markdown-it-highlightjs'
    ]
  }
}