【文件属性】:
文件名称:metalsmith-redirect:Metalsmith插件可创建HTTP重定向
文件大小:116KB
文件格式:ZIP
更新时间:2021-05-23 20:45:17
nodejs metalsmith-plugin JavaScript
金属匠重定向
该插件使您可以在网站中创建HTTP重定向。 有几种方法可以这样做:
在插件配置中(请参阅 )
通过redirectFrom和redirectTo键在源frontmatter中(请参阅 )
安装
npm install metalsmith-redirect
用法
命令行界面
metalsmith.json
{
" plugins " : {
" metalsmith-redirect " : {
" redirections " : {
" /about " : " /about-me " ,
" /images " : " /search?kind=image "
}
}
}
}
Node.js
const metalsmith = require ( 'metalsmith' )
【文件预览】:
metalsmith-redirect-master
----.gitignore(21B)
----package.json(980B)
----.travis.yml(68B)
----index.js(2KB)
----license(1KB)
----example()
--------src()
--------build.js(338B)
--------build.test.js(707B)
----lib()
--------create-redirections-from-arg.js(448B)
--------create-redirections-from-frontmatters.js(1KB)
--------normalize.js(1KB)
----readme.md(9KB)
----test()
--------metalsmith-broken-link-checker()
--------index.js(7KB)
--------gulpsmith()
--------normalize.js(4KB)
----yarn.lock(257KB)