最简单的静态网站生成器 Pagic v0.5.0,修复 watch 的问题,添加 watch(), unwatch() 方法

2017-03-14 21:42:30 +08:00
 xcatliu

GitHub: https://github.com/xcatliu/pagic


最简单的静态网站生成器 Pagic 发布 v0.5.0 啦!

The easiest way to generate static html page from markdown

修复了 watch 的问题

现在不会修改任一文件就全部 rebuild 了。

而是会根据修改的文件类型选择尽可能少的 rebuild 方式。

比如修改 xxx.md 文件,则只 rebuild 这一个文件。如果修改了 _layout.js 则会 rebuild 它的子目录下所有文件。

watch(), unwatch() 方法

pagic.watch().build();

setTimeout(() => {
  pagic.unwatch();
}, 10000);

GitHub 上的测试覆盖率

写了很多单元测试,所以总结了一个测试覆盖率的文章,GitHub 上的测试覆盖率

快来试试吧!

npm install pagic -g

pagic init new_site

cd new_site
pagic build

感谢 tracker1 shellphon hustcc shellphon 等人的建议和帮助!


以下是给不了解 Pagic 的人看的简单介绍。


特性

Links

1927 次点击
所在节点    分享创造
6 条回复
Yourdaye
2017-03-14 21:59:55 +08:00
最好能给个 demo
xcatliu
2017-03-14 22:04:01 +08:00
@Yourdaye 只是个静态网站生成器, css 需要自己写,我没有内置默认的 css 。

这儿有个 demo : http://xcatliu.com/pagic/

这个也是用 Pagic 生成的: https://mobi-css.github.io/mobi-plugin-flexbox/
ifreego
2017-03-15 06:49:00 +08:00
你这个需要自己写 css 啊。我觉得很多人用 hexo,jekyll 啊,都是冲着 themes 去的 -_-||
bztd001
2017-03-31 12:44:54 +08:00
index.md

```
# Pagic

The 简单 way to generate static html page from markdown

## Pages

- [css/site.css](css/site.css)
- [sub](sub)
- [sub/sub_sub](sub/sub_sub)
- [front_matter](front_matter)
- [relative_to_root](relative_to_root)
- [relative_to_root/sub](relative_to_root/sub)

```


***

```
pagic build
```

***

![图片]( http://i1.piimg.com/1949/1e46bad55cb56255.png)


***

如何操作才能使 index.md 中支持中文。。。。。。。
xcatliu
2017-03-31 12:57:38 +08:00
@bztd001 好像还真没测试过中文 😂,谢谢反馈,一会儿我看看
xcatliu
2017-04-03 17:33:19 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/347487

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX