carlcs/craft-revmanifest
Composer 安装命令:
composer require carlcs/craft-revmanifest
包简介
Rev Manifest plugin for Craft CMS
README 文档
README
A Craft plugin to look up a static asset's filename in an asset revisioning manifest like the one gulp-rev outputs.
Installation
To install the plugin, copy the revmanifest/ folder into craft/plugins/. Then go to Settings → Plugins and click the "Install" button next to "Rev Manifest".
Twig function
revUrl( assetPath )
Looks up an asset path in the manifest and returns the asset revision's URL.
{{ revUrl('assets/stylesheets/app.css') }}
{# outputs assets/stylesheets/app-a930f9af02.css #}
If the asset path is not present in the manifest it will return the URL for the original asset.
The asset revision's path will be appended to your Site URL. Set the Site URL in Craft's config settings and Craft doesn't have to fetch it from the database.
Parameters
assetPath
: The original asset path.
Settings
You can set the path to your manifest file in Craft's config settings. Without configuration, the plugins expects the manifest file in assets/rev-manifest.json.
'revManifestPath' => 'rev-manifest.json'
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-02-02