Skip to content

researchsquare/jekyll-asset-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published