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

@gridsome/remark-prismjs

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gridsome/remark-prismjs

Prism for Gridsome

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
132
increased by97.01%
Maintainers
1
Weekly downloads
 
Created
Source

@gridsome/remark-prismjs

Syntax highlighter for markdown code blocks

Install

  • yarn add @gridsome/remark-prismjs
  • npm install @gridsome/remark-prismjs

Usage

In your main.js file, import a Prism CSS theme:

import 'prismjs/themes/prism.css'

export default function (Vue) {
  // ...
}

In gridsome.config.js, add syntax highlighter to a single markdown source:

module.exports = {
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: 'blog/**/*.md',
        route: '/blog/:year/:month/:day/:slug',
        remark: {
          plugins: [
            '@gridsome/remark-prismjs'
          ]
        }
      }
    }
  ]
}

Or add syntax highlighter to all markdown sources:

module.exports = {
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {}
    }
  ],

  transformers: {
    remark: {
      plugins: [
        '@gridsome/remark-prismjs'
      ]
    }
  }
}

Keywords

FAQs

Package last updated on 08 Mar 2019

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