【文件属性】:
文件名称:metalsmith-external-metadata:Metalsmith插件,用于从外部源文件添加元数据
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-05 09:36:54
JavaScript
金属匠外部元数据
Metalsmith插件,用于从外部源文件添加元数据
此插件将JSON文件作为外部数据源读取到同一目录中具有相同名称HTML文件。
用法
给定具有以下文件的src目录:
├── src/
├── index.html
├── index.json
在您的Metalsmith版本中使用插件:
var Metalsmith = require ( 'metalsmith' ) ;
var extMeta = require ( 'metalsmith-external-metadata' ) ;
Metalsmith ( __dirname )
. use ( extMeta ( {
// options here
} ) ) ;
index.json将被卷入index.html的元数据中。
选项
扩展名
类型: String默认值:
【文件预览】:
metalsmith-external-metadata-master
----.travis.yml(92B)
----package.json(709B)
----test()
--------test.js(1KB)
--------fixtures()
----LICENSE(1KB)
----src()
--------index.js(1KB)
----.gitignore(36B)
----Makefile(112B)
----README.md(907B)
----.gitattributes(12B)