AssetManifest

Free!
Download
AssetManifest
Description

Addon for Statamic: searches occurences of files and replaces them as listed in the manifest

Heavily inspired by https://github.com/edcs/laravel-mix-statamic.

Installation

with git

Run this command in the root of your theme:

git submodule add [email protected]:mmintel/statamic-asset-manifest.git site/addons/AssetManifest

without git

Download the addon and place it in your Statamic folder under site/addons/AssetManifest.

Usage

Just place an asset-manifest.json in your theme and reference your assets via {{ asset_manifest:js }} or {{ asset_manifest:css }} and this addon will replace them with the associated files of your manifest.

A manifest file looks like that:

{
  "/css/default.css":"/css/default-9c1d17762e887e413460d516954c2406.css",
  "/js/default.js":"/js/default-2706e5c549bb2e6acd588e27880516cd.js"
}

This addon will not generate this manifest for you, it will just replace your assets. To generate this file you should use a build tool like Gulp, Grunt, Webpack, NPM scripts or whatever.

If no manifest file was found it will simply load the files without hashes.

Importing specific files

The asset_manifest tag works exactly like the theme tag. So e.g. {{ asset_manifest:css }} will import /css/default.css and {{ asset_manifest:css src="test" }} will import /css/test.css.

This addon will not generate this manifest for you, it will just replace your assets. To generate this file you should use a build tool like Gulp, Grunt, Webpack, NPM scripts or whatever.


Important Links
Details
Released April 13, 2018
Updated 2 years ago
Version 1.0.0
Downloads 625
Requires Statamic 2

Mintel.me

More by Mintel.me

Similar Addons

See All
Filter tag pairs by expiration date

Expires On

by Becky Soll in Modifier
Filter tag pairs by expiration date
Connect your Statamic website to StoryChief and publish straight to Statamic

StoryChief

by StoryChief in Control Panel, Fieldtype, Modifier
Connect your Statamic website to StoryChief and publish straight to Statamic
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.

Anchor Extension

by Frederik Sauer in Enhancement, Modifier
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.
Typeahead search for FontAwesome icons in the CP and easily output icons in templates using tags.

FontAwesome

by Aryeh Raber in Modifier
Typeahead search for FontAwesome icons in the CP and easily output icons in templates using tags.