matthodan / jekyll-asset-pipeline

Powerful asset pipeline for Jekyll that collects, converts and compresses JavaScript and CSS assets
http://www.matthodan.com/2012/11/22/jekyll-asset-pipeline.html
MIT License
364 stars 31 forks source link

Assets disappear after file change #10

Closed sud0n1m closed 11 years ago

sud0n1m commented 11 years ago

I'm having an issue where as soon as I change one file, the assets disappear. For what it's worth, I started with the default config and also experienced the problem so I turned off a lot of the asset pipeline.

https://gist.github.com/4377611

https://gist.github.com/4377617

My process is:

  1. Run jekyll --auto
  2. Load a page -- it works
  3. Save a change to index.md
  4. Reload, it doesn't work.

My guess is it may be that I'm saving to ../public but I have no idea.

Thanks for an awesome plugin to jekyll.

matthodan commented 11 years ago

My first reaction is that it feels dangerous to use '../public' for your destination, but I don't think that should necessarily cause the problem you are describing. My recommendation would be to save to '_site' within your Jekyll project and symlink to this directory. That said, JAP will save to any destination you choose (assuming it has the necessary permissions to do so).

This issue did highlight that JAP's current log output is inaccurate-- it always shows assets as saved to the '_site' folder, even if they are being saved elsewhere. I just pushed commit 4995ad8 to fix this inaccuracy. Now JAP will report the full output path to any file saved.

I just created a fresh Jekyll site to try to recreate your problem, but didn't run into any issues. A couple of questions:

sud0n1m commented 11 years ago

Hey Matt,

I edited the config so now everything gets generated in _site

But still, the original problem where if I'm running with --auto, the entire assets directory gets deleted from _site as soon as I tweak index.md or any other file that causes jekyll to regnerate any file.

  1. Hit save on index.md
  2. Console outputs [2012-12-26 17:44:40] regeneration: 1 files changed
  3. assets directory within _site disappears.

I confirmed this behavior happens on a second jekyll site. The most basic site I could do: https://github.com/sud0n1m/example-jekyll

C

matthodan commented 11 years ago

This is very strange behavior-- I've tried several different configurations to replicate this behavior to little avail. Are you by any chance deleting the YAML front matter (i.e. the two '---' lines) from the file with the manifest between saves? This would cause JAP to no longer process the assets and in turn remove them from the destination folder.

Another thought: Is JAP saving to subfolders within the 'assets' directory? As pointed out in issue #1, this will not work due to an Jekyll bug. #EDIT# I just re-read your gist and realized that this does not seem to be the case.

matthodan commented 11 years ago

I'm going to close this issue, as I have been unable to replicate the behavior. I'm happy to spend more time on it if you can give me more specific instructions to replicate the behavior with a new project. Sorry I couldn't be more helpful.

sud0n1m commented 11 years ago

Thanks Matt. It happens consistently for me on the new repo I linked to so I removed jap. I may try it on some other machines to see if maybe it is some odd config / package on mine.

Sent from my iPhone

On Dec 31, 2012, at 6:38 PM, Matt Hodan notifications@github.com wrote:

I'm going to close this issue, as I have been unable to replicate the behavior. I'm happy to spend more time on it if you can give me more specific instructions to replicate the behavior with a new project. Sorry I couldn't be more helpful.

— Reply to this email directly or view it on GitHub.