envygeeks / jekyll-assets

:art: Asset pipelines for Jekyll.
ISC License
1.11k stars 169 forks source link

digest: false configuration being ignored #458

Closed devraj closed 6 years ago

devraj commented 6 years ago

Description

Lodging this as a bug after me trying this on two production Jekyll installs. The digest setting is set to false but still produces the digest on the asset file names.

Steps

The following is how my Jekyll site is setup with jekyll-assets version 3.0.2 along side jekyll version 3.6.2 relevant configuration as follows:

Gemfile for the site

source 'https://rubygems.org'

gem 'jekyll'
gem 'uglifier'
gem 'kramdown'
gem 'rouge'
gem 'liquid'
gem 'octopress-autoprefixer'
gem 'redcarpet'

group :jekyll_plugins do
    gem 'jekyll-watch'
    gem 'jekyll-assets'
    gem 'jekyll-feed'
    gem 'jekyll-seo-tag'
    gem 'jekyll-sitemap'
end

_config.yml extract:

plugins:
  - jekyll-assets
  - jekyll-feed
  - jekyll-seo-tag
  - jekyll-sitemap
  - octopress-autoprefixer

assets:
  digest: false
  caching: 
    type: memory
  sources:
    - _assets/css
    - _assets/js
    - _assets/fonts
    - _assets/img

Output

            Source: /Users/devraj/Work/WebApps/zen
       Destination: /Users/devraj/Work/WebApps/zen/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/screen-f44e0adf8a74f346853740055ade3bf5c9166323544757605d7505d8c577ab49.css
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/site-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.js
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/apple-touch-icon-76-b466ea76a2cdafdd708a38600eb389a5596de296f73c6e32fe4369dd2804c7f0.png
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/apple-touch-icon-120-8fe4d735a9acea1a3727cb21eb6c149f7e9c91faadd436f9aca798a5db09199f.png
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/apple-touch-icon-152-97b224a6d37317f2a7361ea5c30607e71663765ec9c1f3a33ce7e7b87727af17.png
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/apple-touch-icon-180-d7033dcff948b8ebe8ee7c4a220961da1ded6a841326ad55dac2f81279c6d68a.png
           Assets:  Writing /Users/devraj/Work/WebApps/zen/_site/assets/favicon-041e452d40a0f4b812051c0ec4d0726bbde600f7a0781c5ac30f55e7e02e33b6.ico

Expected

Files being written without the digest.

envygeeks commented 6 years ago

We don't allow you to disable digesting in 3.0. It still being listed as an option is the bug here. The lack of digesting only forces us to hack Sprockets, and it doesn't provide any useful benefit.

devraj commented 6 years ago

@envygeeks so does that mean there would be no way of exposing an asset with a particular "fixed" name? e.g /assets/screen.css ?

envygeeks commented 6 years ago

Why would you want that?

devraj commented 6 years ago
envygeeks commented 6 years ago

The feature required us to maintain a lot more than I wanted to, and to consider a lot more than I wanted to. Sprockets doesn't support what you want which meant I had to take over parts of Sprockets to get what you wanted in 2.x.

If somebody is willing to monetarily sponsor it's initial development and testing, I'm happy to add it into the new rewrite, other than that though I feel it would take too much development time.

envygeeks commented 6 years ago

The reason why is because now we have to write code that works with Sprockets 3, and 4. Can be back ported and supported for at least a year, with minimal effort, and can integrate into our workflow which is much more well designed than Assets 2.x

devraj commented 6 years ago

@envygeeks Anomaly would be willing to consider sponsoring it, do you want to drop us a line and carry on the conversation there?

envygeeks commented 6 years ago

They @devraj there are so many ways to contact ya'll I don't know which is best. It might be easier if ya'll email me at jordon at envygeeks.io, I'll be available for the next few hours if you want to chat over the phone too, if that's easier.