Tag: metalsmith

Metalsmith.js:如何构build到与构build脚本相同的目录?

我对Metalsmith完全陌生。 我一直在关注这个教程: http : //www.robinthrift.com/posts/metalsmith-part-1-setting-up-the-forge/ 我想build立我的网站到我的项目的根目录(与生成脚本相同的目录)。 我想要做到这一点,因为我希望github页面可以很好地播放它。 但是当我尝试构build时,我得到这个错误:错误:EBUSY,资源忙或locking 这是我的dir结构: project_folder / _site-SRC / 的index.html node_modules build.js 的package.json 这里是我的build.js源代码: var Metalsmith = require("metalsmith"); Metalsmith(__dirname) .source("_site_src") .destination(".") .build(); 我想让我的项目目录看起来像: project_folder / _site-SRC / 的index.html node_modules build.js 的package.json 的index.html 我不知道我在做什么错。 我感谢任何帮助。

Metalsmith静态网站页面缺less元数据

我一直在尝试一个教程来build立Metalsmith ,我已经到了第一部分的末尾。 我已经安装了node.js和模块。 IDE是安装了Node.js工具的Visual Studio 2013。 我已经把一个基本的结构,我试图让一个单一的页面呈现与模板。 这些指示告诉把以下内容放入一个文件中: — title: Home template: home.hbt — This is your first page 使用如下模板: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>{{ title }} | Metalsmith Page</title> </head> <body> <div class="main-wrapper"> {{{ contents }}} </div> </body> </html> 本教程说,它应该渲染到一个HTML页面,但我得到的结果是这样的: — title: Home template: home.hbt — This is your first […]