1.0.2 • Published 4 years ago
orlog v1.0.2
静态文章生成器
用最简单最存粹的方式写博客,生成静态文件,打包部署。
使用方法
先创建一个文件夹
mkdir demo
cd demo
npm i -g orlog
touch index.md
创建配置文件
orlog.json
{
"style":"样式文件,不填则默认使用自带的样式",
"favicon":"收藏夹图标,不填使用默认图标",
"template":"html模版,默认为<!DOCTYPE html><html><head><meta charset=\"utf-8\" />$H</head><body>$B</body></html>"
}
编写文章
xxx.md
第一行是标题,会修改标签页
description: 描述
keywords: 关键字
others: 中间这一段的内容会以key-value的形式作为meta插入到head标签里
从这里开始都是正文,想写什么就写什么。
预览效果
可以在浏览器中打开localhost:8080
查看生成的效果
orlog dev
打包成zip
orlog
会在项目文件夹下生成web.zip
压缩包