All Projects → chiaweilee → umi-plugin-md

chiaweilee / umi-plugin-md

Licence: MIT license
🍚 Markdown(*.md) component plugin for umi.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
Less
1899 projects

Projects that are alternatives of or similar to umi-plugin-md

umi-plugin-electron-builder
umi的electron插件
Stars: ✭ 115 (+618.75%)
Mutual labels:  umi, umi-plugin
umi-plugin-mobx
😍 use mobx-state-tree gracefully in umijs.
Stars: ✭ 33 (+106.25%)
Mutual labels:  umi, umi-plugin
umi-plugins
Umi Plugins
Stars: ✭ 14 (-12.5%)
Mutual labels:  umi, umi-plugin
umi-plugin-menus
将 umi 生成的 routes 转换成 tree 结构 menus 数据,开发中可直接引入该文件来进行导航菜单的生成
Stars: ✭ 29 (+81.25%)
Mutual labels:  umi, umi-plugin
umi-react-native
umi preset plugins for react-native
Stars: ✭ 54 (+237.5%)
Mutual labels:  umi, umi-plugin
Ant-Design-Pro-V5
Ant Design Pro V5 详细配置,包括分模块打包,ahooks的使用,L7 地图组件的封装,合理的初始化数据,更有动态表单、动态表格、OSS图片上传等优秀组件(项目会逐渐迭代)~
Stars: ✭ 28 (+75%)
Mutual labels:  umi
mageri
MAGERI - Assemble, align and call variants for targeted genome re-sequencing with unique molecular identifiers
Stars: ✭ 19 (+18.75%)
Mutual labels:  umi
pityWeb
🎉一个持续迭代的开源接口测试平台(前端),欢迎大家多提issue多给反馈。 求star⭐,我会努力更新下去的!
Stars: ✭ 25 (+56.25%)
Mutual labels:  umi
umi-dva-antd-starter
Get started with Umi3.js and Ant Design.
Stars: ✭ 17 (+6.25%)
Mutual labels:  umi
toutiao
模仿今日头条,实现 APP 端,Server 端, Web 管理端
Stars: ✭ 17 (+6.25%)
Mutual labels:  umi
simpleCMS
simpleCMS是一款开源cms系统, 主要为个人/团队快速开发博客或者知识共享平台, 类似于hexo, worldpress, 但是他们往往需要复杂的搭建过程, 我们将复杂度降到最低, 并且有详细的部署教程, 你只需要有一台服务器, 就能轻松拥有一个属于你的博客平台.
Stars: ✭ 74 (+362.5%)
Mutual labels:  umi
Ant Design Pro
👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
Stars: ✭ 30,909 (+193081.25%)
Mutual labels:  umi
ant-design-mobile-pro
🛠 Use Ant Design Mobile like Ant Design Pro.
Stars: ✭ 22 (+37.5%)
Mutual labels:  umi
egg-view-assets
Manage frontend assets in development and production.
Stars: ✭ 51 (+218.75%)
Mutual labels:  umi
fastq utils
Validation and manipulation of FASTQ files, scRNA-seq barcode pre-processing and UMI quantification.
Stars: ✭ 25 (+56.25%)
Mutual labels:  umi
blog
一个博客全栈应用的前端部分
Stars: ✭ 16 (+0%)
Mutual labels:  umi
pc-Dooring
LowCode, PC Page Maker, PC Editor. Make PC as easy as building blocks. | 让网页制作像搭积木一样简单, 轻松搭建PC页面, Web网站, PC端网站. lowcode(low-code)可视化搭建平台
Stars: ✭ 407 (+2443.75%)
Mutual labels:  umi
umi-plugin-datahub
umi plugin for integrating macaca-datahub, which is a GUI-style mock tool that can be used to replace umi's built-in mock solution.
Stars: ✭ 21 (+31.25%)
Mutual labels:  umi
route-utils
umi route utils
Stars: ✭ 32 (+100%)
Mutual labels:  umi
kernel xiaomi sm8250
CLO Rebased kernel for Xiaomi SM8250 series devices updated to CAF tag LA.UM.9.12.r1-14700-SMxx50 with AOSP android-4.19-stable merged.
Stars: ✭ 111 (+593.75%)
Mutual labels:  umi

umi-plugin-md · GitHub license npm version npm downloads PRs Welcome

Markdown(*.md) component plugin for umi.

Create your website with umi and markdown only. Convenient and powerful for blog, documentation site and GitBook.

  • Convert markdown into component: loaded by markdown-it and translate into React component.
  • Auto routes create: auto create markdown routes from dir.
  • Auto anchor: auto create anchor for h1, h2 and h3.
  • XSS protect: by xss.
  • Support: [email protected] only

Example

Installation

npm install umi-plugin-md

Demo

https://chiaweilee.github.io/umi-plugin-md/

Usage

// .umirc.js
export default {
  plugins: ['umi-plugin-md'],
};

Options

option intro type default
anchor Auto Anchor ^0.2.0 string[], falsy to disable ['h1', 'h2', 'h3']
wrapper HTMLElementTagName string section
className React className string
style React style object
html markdown-it option boolean true
xhtmlOut markdown-it option boolean true
breaks markdown-it option boolean true
linkify markdown-it option boolean true
typographer markdown-it option boolean true
highlight markdown-it option function highlight.js
render wrapper render (rawHtml: string) => string; see src/render.ts

tips: route of markdown will have higher priority, so route might be covered.

e.g, index.md will cover index.jsx.

Anchor

Example

Get anchor id?

import { slug } from 'umi-plugin-md';

var text = $('h2').text();
var id = slug(text);

Or copy umi-plugin-md/lib/helpers/slug.js to your repo.

Anchor Stylize

// global.css
@import "~umi-plugin-md/anchor.css";

Or, write yourself.

tips: we do not support scroll to anchor on 'componentDidMount' this moment.

Markdown Stylize

github-markdown-css

// global.css
@import "~github-markdown-css/github-markdown.css";
@import "~highlight.js/styles/github.css";
// .umirc.js
export default {
  plugins: [['umi-plugin-md', { className: 'markdown-body' }]],
};

Priority

index.md have higher priority than index.jsx.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].