Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instante assets

Useful macros for latte assets

Build Status Downloads this Month Latest stable

Requirements

Installation

The best way to install Instante assets is using Composer:

$ composer require instante/assets

Then add new extension to neon configuration

extensions:
    assets: Instante\Assets\DI\AssetsExtension

Usage

Instead of following code:

<link rel="stylesheet" href="{$basePath}/css/main.min.css">

you should use:

<link rel="stylesheet" href="{hashedAssetVersion 'css/main.min.css'}">

It will automatically generates MD5 hash of current asset to prevent unwanted caching. Hash is regenerated after 1 week or after you manually clear cache.

To simply prepend $basePath url to asset, you can use macro {asset 'path/to/file'}.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages