Skip to content
upload the local image in markdown files to qiniu cdn
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src
test
.gitignore
README.md
index.js
package.json

README.md

markdown图片上传

这个插件用于将markdwon文件中的本地图片上传到七牛CND

Config

七牛云配置

{
    "accesskey": "your_accesskey",
    "secretkey": "your_secretkey",
    "bucket": "bucket_name",
    "cdn": "cdn_base_link"
}

Step

使用步骤

// 加载插件和配置参数
let plugin = require('../index');
let config = require('../config/qiniu.json');

// 配置七牛参数
let { upload, parse } = plugin;
upload.config = config;

// 解析
parse({
    filename: './test.md', // 文件名
    upload: upload, // 制定上传函数
    output: 'dist' // 输出目录
});
You can’t perform that action at this time.