mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-27 14:15:52 +10:00
10 lines
336 B
JavaScript
10 lines
336 B
JavaScript
const { getOptions } = require('loader-utils')
|
|
const frontmatter = require('yaml-front-matter')
|
|
|
|
module.exports = function (src) {
|
|
const { markdown } = getOptions(this)
|
|
const content = frontmatter.loadFront(src).__content
|
|
const html = markdown.render(content)
|
|
return `<template><div class="markdown">${html}</div></template>`
|
|
}
|