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