No release in over a year
Dynaic asset urls for Jekyll
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Jekyll::AssetUrl

This is a Jekyll plugin to map javascript files to their generated file names.

Installation

Add this line to your application's Gemfile:

gem 'jekyll-asset-url'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-asset-url

Usage

This plugin is intended to be used in conjunction with WebpackManifestPlugin. To use, add the following to _config.yml:

# _config.yml
assetManifest: '<relative path to manifest>'

Then, in your code, use the {{asset_url}} filter:

<!-- footer.html -->
<script type="text/javascript" src="{{ /dist/scripts/app.js | asset_url }}"></script>