Skip to content

Use Laravel Mix with Statamic in Blade templates like you already do with Laravel

License

Notifications You must be signed in to change notification settings

zawilliams/statamic-blend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Blend for Statamic Statamic 2.11

Use Laravel Mix with Statamic in Blade templates like you already do with Laravel. It uses the Mix class from Laravel as a singleton with some Statamic adaptations for finding theme files. This Addon works with Blade templates only. If you're using Antlers, check out Statamic Mix.

Installation

Simply copy the Blend folder into site/addons/. That's it!

Usage

Just use it like you would normally use Mix with Laravel Blade templates:

<!DOCTYPE html>
<html>
    <head>
        <title>Statamic</title>
        <link rel="stylesheet" href="{{ mix('css/app.css') }}">
    </head>
    <body>
        <script src="{{ mix('js/app.js') }}"></script>
    </body>
</html>

You can also change your manifest directory just like you can with Laravel:

<link rel="stylesheet" href="{{ mix('css/app.css', 'public/build') }}">

Acknowledgements

About

Use Laravel Mix with Statamic in Blade templates like you already do with Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages