octopress / asset-pipeline

Adds your local CSS, Sass, Javascript and Coffeescript files to Octopress Ink's asset pipeline.
MIT License
4 stars 3 forks source link

Allow changing output directory #17

Closed tohuw closed 9 years ago

tohuw commented 9 years ago

It seems there's no option to change the output directory. For example, I'd like _site/js instead of _site/javascripts.

imathis commented 9 years ago

I can add a configuration for this, but I'm curious; why is this important to you?

tohuw commented 9 years ago

Nothing insurmountable, but the little things add up.

As someone inserting octopress and ink into an established workflow, it's awkward to have to shuffle everything around to ensure it matches the output expectations. A good example is jekyll-compass, and there's others that deal with assets above and beyond what octopress currently provides. They have configurations to allow changing to javascripts and stylesheets, but it seems the standard out there is js and css.

Beyond that, I simply like the brevity, and I also want to feel in control of my output. I suspect many Jekyll users feel the same way. The current system feels "forced". For example, per my issue I opened against littlefoot, I found that the only way to work this in properly was to have asset-pipeline combine and compress the JS and CSS, and to use javascripts and stylesheets. So instead, I directly integrated the CSS and JS to avoid this requirement.

If adding this configuration isn't too severe, I think it would be appreciated.

imathis commented 9 years ago

but it seems the standard out there is js and css.

That may be common in some circles. I chose javascripts and stylesheets because that is the convention with Rails, and in Ruby circles people tend to expect Rails-like conventions.

I'm working on a patch to add a configuration to octopress-ink which will also affect littlefoot.

tohuw commented 9 years ago

Ah, that's good to know it's a standard in the rails world. I'm a recent convert to Ruby, so I wasn't aware of that. Thanks for the background.

Cool, thanks for the patch!

imathis commented 9 years ago

If you update octopress-ink to 1.2.0 you can add this to your configuration:

asset_pipeline:
  javascripts_destination: js
  stylesheets_destination: css

And you'll get what you're after.