1 Star 1 Fork 0

dpapejs / dpape-markdown-html

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

dpape-markdown-html

markdown 文档生成html文档, 支持vue文档展示,支持js运行

语法参考 Markdown Nice最全功能介绍

请在代码块语法加上类型 runtime-js

更新日志

安装

# 全局安装
npm i dpape-markdown-html -g
# OR
yarn global add dpape-markdown-html

# 项目按照
npm i dpape-markdown-html -D
# OR
yarn add dpape-markdown-html -D

查看帮助命令

- dpa-md -h

Usage: command [options]

Options:
  -h, --help  display help for command
Commands:
   start         Start Run the dev server
   build         Build the project

主题样式文件

1、项目中theme文件下面有一个markdown-theme.css的主题样式文件

2、使用highlight.js的主题文件也可

插入js文件

scriptLink('./js/vue3.js')

插入css文件

styleLink('./js/style.css')

js 代码块

script(`
var app = Vue.createApp({
    data(){
        return {
            checked:false
        }
    }
});
app.use(dpape);
app.mount('#app');
`);

插入html元素

html('<div>测试元素</div>');

页面中插入样式代码

innerStyle("body,p,li{padding:0;margin:0;}")
# runtime-less
# runtime-vue
# runtime-js
MIT License Copyright (c) <year> <copyright holders> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

dpape-markdown-html 展开 收起
TypeScript 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/dpapejs/dpape-markdown-html.git
git@gitee.com:dpapejs/dpape-markdown-html.git
dpapejs
dpape-markdown-html
dpape-markdown-html
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891