【文件属性】:
文件名称:gatsby-source-local-git:Gatsby源插件,可从本地git存储库中获取数据
文件大小:440KB
文件格式:ZIP
更新时间:2021-02-22 17:07:19
plugin git graphql gatsby JavaScript
gatsby-source-local-git
一个Gatsby源代码插件,用于从本地git存储库中将数据采购到您的Gatsby应用程序中。
描述
此源插件使gatsby网站可以在构建时包括有关其自己的git存储库的元数据。 可能的功能是:
在关于页面上打印最新的git commit的哈希
包括当前git分支的名称(对于Canary构建或拆分部署可能很有用)
创建所有git作者/贡献者的列表
缺少功能? 请创建一个问题(甚至是请求请求)。
如何安装
npm install --save gatsby-source-local-git
使用范例
// In your gatsby-config.js
module . exports = {
plugins : [ `gatsby-source-local-git` ] ,
}
您可以在此处找到正在运行的示例: :
该示例的
【文件预览】:
gatsby-source-local-git-master
----.gitignore(1KB)
----package.json(1KB)
----package-lock.json(1018KB)
----src()
--------gatsby-node.ts(2KB)
--------gatsby-node-helper.ts(690B)
--------__tests__()
--------git.ts(2KB)
----jest.config.js(6KB)
----.devcontainer()
--------Dockerfile(1KB)
--------devcontainer.json(886B)
----LICENSE(1KB)
----index.js(8B)
----CHANGELOG.md(484B)
----tsconfig.json(6KB)
----.github()
--------workflows()
----examples()
--------using-gatsby-source-local-git()
----README.md(4KB)
----gatsby-node.js(86B)
----.prettierrc(108B)
----.dependabot()
--------config.yml(433B)