在livereload开发环境中仅更改包含的markdown文件时,如何从jade文件自动生成html? [英] How to auto-generate html from jade file when only included markdown file has changed in livereload development environment?

查看:88
本文介绍了在livereload开发环境中仅更改包含的markdown文件时,如何从jade文件自动生成html?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个像这样的文件:

So I've got a file like this:

# index.html.jade
p Test
include content.md

因此如果我更改了content.md out/index.html的内容,则不会重新生成(因为index.html.jade文件本身当然没有发生变化). (我正在使用 livereload -

So if I change the content of content.md out/index.html is not regenerated (because the index.html.jade file itself of course has not changed). (I am using livereload - in the HTML 5 Boilerplate docpad template - and the so the browser does not refresh on a valid change :-( )

另一方面,先前版本和当前版本(在content.md更改之后)的最终out/index.html文件是不同的(很可能是在可见的更改上).

On the other hand the final out/index.html file of the previous and current version (after the content.md change) are different (most likely on visible changes).

我看到了如何/应该如何处理(也许已经可行)的方法:

I see ways how this could/should be treated (maybe it is already possible):

  • (玉器)更改检查还应考虑可能影响输出的相关文件(例如include d文件),从而在包含的文件发生更改时重新生成包含的文件

  • the (jade) change-checking should also consider dependent files that may influence the output (e.g. included files) and thus regenerate the including files if the included ones changed

解决方法(如果在框架内上述操作应比较棘手):

workarounds (if the above should be tricky within the framework):

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆