项目
在 GitHub 查看
hmsk/frontmatter-markdown-loader
关于
📝 Webpack Loader for: FrontMatter (.md) -> HTML + Attributes (+ React/Vue Component)
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文frontmatter-markdown-loader
Webpack Loader for Front Matter files (.md) which returns:
- Front Matter attributes
- Compiled markdown as HTML
- Compiled markdown as a React component
- Compiled markdown as a Vue component
This FrontMatter markdown file something.md:
---
subject: Hello
tags:
- tag1
- tag2
---
# Title
message
is loadable as:
import fm from "something.md"
fm.attributes // FrontMatter attributes => { subject: "Hello", tags: ["tag1", "tag2"] }
fm.html // Compiled markdown as HTML => "<h1>Title</h1>\n<p>message</p>\n"
fm.react // Component function for React which renders compiled markdown (Disabled as default)
fm.vue.component // Extendable component object for Vue which renders compiled markdown (Disabled as default)
📚 See the documentation for the further detail.
🔰 You have trouble with missing object?
The loader got the breaking changes in the latest major update. The article which you referred might premise on the old version. Check the installed version, if that says 1.x.y, see this guide.
Samples
Inspired/Referred
- egoist/vmark: Convert markdown to Vue component.
- webpack-contrib/json-loader: json loader module for webpack
License
- MIT License Copyright 2018-present Kengo Hamasaki
- And thanks for Contributors
探索相关项目
加载中…