leowebguy/git-info
最新稳定版本:2.0.0
Composer 安装命令:
composer require leowebguy/git-info
包简介
Output git info over twig
README 文档
README
Output git info over twig
Installation
Shell
composer require leowebguy/git-info -w && php craft plugin/install git-info
DDEV
ddev composer require leowebguy/git-info -w && ddev exec php craft plugin/install git-info
Usage
{{ craft.git.branch }} >> current branch, i.e: stage
{{ craft.git.remoteUrl }} >> i.e: github.com:leowebguy/git-info.git
{{ craft.git.lastTag }} >> i.e: 3.1.2
{{ craft.git.commitHash }} >> last commit hash
{{ craft.git.commitAuthor }} >> last commit author (name)
{{ craft.git.commitDate }} >> last commit date
{% if not craft.app.config.custom.isProd %}
<div style="position: fixed; bottom: 1rem; right: 1rem; padding: 6px 10px; text-align: right; border: solid 1px #eee; z-index: 999;">
{{ 'branch: ' ~ craft.git.branch }}<br>
{{ 'remote url: ' ~ craft.git.remoteUrl }}<br>
{{ 'last tag: ' ~ craft.git.lastTag }}<br>
{{ 'commit hash: ' ~ craft.git.commitHash }}<br>
{{ 'commit author: ' ~ craft.git.commitAuthor }}<br>
{{ 'commit date: ' ~ craft.git.commitDate }}
</div>
{% endif %}
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-11-29
