Skip to content

qiuyuntao/markdown-code-highlight-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-code-highlight-loader

This is a webpack loader, use marked to translate *.md to html, so that you can use in webpage.

And use highlight.js to highlight your code when you write in your *.md

  • npm install markdown-code-highlight-loader --save in your project

  • in your webpack.config.js, write like This

    module: {
      loaders: [{
        test: /\.md$/,
        loader: "html!markdown-code-highlight"
      }]
    }
    
  • or in your js, import like this

  var html = require('html!markdown-code-highlight!./readme.md')
  • import css in your webpage
require('./index.css');

highlight style

If you don't like the style in index.css, you can also use other highlight style.

About

webpack loader for markdown and highlight code

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •