Commit graph

6 commits

Author SHA1 Message Date
Thomas Reynolds d935aedd59 Sitemap refactor 2012-04-14 13:17:42 -07:00
Ben Hollis 192047d242 Minify all JS and CSS via middleware. This means JS or CSS anywhere in the site is minified, not just in the Sprockets-controlled directories. I've also added inline CSS compression, and handling of several common "guards" that get wrapped around JS. Also, leave alone non-JS script tags (which may contain something like jQuery templates). Sprockets no longer has anything to do with minification after this. 2012-04-09 00:05:22 -07:00
Ben Hollis fc79459e61 Fix the asset_hash extension to operate on the hash of the rendered output rather than just the source file. This prevents generating the same hash for a file when partials it uses change, or if a helper it uses produces different output. As part of this change I removed the caching from Sitemap::Page#destination_path and asset_hash since they were preventing recalculation of path/hash when partials changed, and I rewrote the Sprockets extension to expose the Sprockets environment to other extension, which included consolidating the JS and CSS Sprockets environments into one. 2012-04-04 00:00:33 -07:00
Ben Hollis 4a4454fcab Introduce a cache tied to individual sitemap pages. This helps individual extensions avoid having to implement methods to clear the cache whenever a page changes. 2012-04-01 20:37:24 -07:00
Ben Hollis 0470fa3083 Remove nonsense comment 2012-03-04 23:37:16 -08:00
Ben Hollis 073086b79c Extension to add hash values to asset filenames. This extension causes asset file types (images, scripts, stylesheets, etc) to have a unique identifier appended to their filename that consists of a hash of their contents. This extension also includes a Rack middleware that rewrites references to these assets in HTML, JavaScript, and CSS files, eliminating the need to use special helper functions to include modified filenames in references. 2012-03-04 15:24:38 -08:00