harrego / jekyll-asset-post-processor Goto Github PK
View Code? Open in Web Editor NEWProcess then suffix your Jekyll assets with cache busting version hashes
Home Page: https://rubygems.org/gems/jekyll-asset-post-processor
License: MIT License
Process then suffix your Jekyll assets with cache busting version hashes
Home Page: https://rubygems.org/gems/jekyll-asset-post-processor
License: MIT License
Thanks for creating this @harrego, it was exactly what i was looking for to optimize a pet project of mine โ it's so great to find a Jekyll plugins that has such a recent commit history, those are hard to come by these days...
However, i'm having trouble updating my codebase with it, as basically all my linked links use the relative_url
filter to allow deploying to a subpath on github to preview via github pages.
When i update a current code snippet like this:
<link rel="preload" as="style" href="{{ "/assets/css/fontawesome-all.min.css" | relative_url }}" />
to this:
<link rel="preload" as="style" href="{% process_asset "assets/css/fontawesome-all.min.css" | relative_url %}" />
the build process fails with:
Liquid Exception: No such file or directory @ rb_file_s_mtime - "assets/css/fontawesome-all.min.css" | relative_url in ~/prog/b3f/stadtwerk-mit-zukunft/_layouts/default.html
Error: No such file or directory @ rb_file_s_mtime - "assets/css/fontawesome-all.min.css" | relative_url
Error: Run jekyll build --trace for more information.
The tag can be used in any HTML or Sass file and even supports Liquid variables, filters, and tags
Maybe i'm doing something wrong here? Kindly advise in that case. I feel like i tried all possible combinations already to no avail.
<link rel="preload" as="style" href="{% process_asset "assets/css/fontawesome-all.min.css" %}" />
Works fine, rendering the expected
<link rel="preload" as="style" href="/assets/css/fontawesome-all.min-3e7031c99ff382f5f2fbd6a10069e266.css" />
so jekyll-asset-post-processor
is installed correctly and working fine โ except it is not usable for me as this file cannot be found when a baseurl
is set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.