rbuchberger / jekyll_picture_tag

Easy responsive images for Jekyll.
https://rbuchberger.github.io/jekyll_picture_tag/
BSD 3-Clause "New" or "Revised" License
622 stars 106 forks source link

Any way to not have the generated folder? #270

Closed Mirabis closed 2 years ago

Mirabis commented 2 years ago

I currently have it configured as:

picture:
  source: "/assets/img"
  output: "/assets/img" # I don't want /generated
...

This results in files as follows:

_site/assets/img/picture1.jpg
_site/assets/img/generated/picutre1.jpg
...

I rather have it overwrite the output file in _site as the original is already in assets (root folder). Any way to configure that behavior?

Tweaking it to use the root works partially, as it crashes midway

picture:
  source: "/"
  output: "/" # I don't want /generated
  ...

Midway

Generating new image file: /assets/img/brand/icon-585-5f4efb5ec.webp
Generating new image file: /assets/img/brand/icon-600-5f4efb5ec.webp
Generating new image file: /assets/img/brand/icon-717-5f4efb5ec.webp
Generating new image file: /assets/img/brand/icon-100-dcf82ec7f.png

Crash

Traceback (most recent call last):
        10080: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `<main>'
        10079: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `load'
        10078: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
        10077: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        10076: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        10075: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        10074: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        10073: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
         ... 10068 levels...
            4: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/cleaner.rb:80:in `parent_dirs'
            3: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/cleaner.rb:80:in `parent_dirs'
            2: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/cleaner.rb:80:in `parent_dirs'
            1: from /mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/cleaner.rb:80:in `parent_dirs'
/mnt/d/Repositories/www.example.com/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/cleaner.rb:80:in `parent_dirs': stack level too deep (SystemStackError)
Mirabis commented 2 years ago

Managed to resolve it

imput: assets/_img/
output: assets/img/