Commit graph

19 commits

Author SHA1 Message Date
Ben Hollis 7a4aa109a6 Overhaul content-type handling, making it configurable via page/proxy commands as well as frontmatter with the 'content_type' parameter.
Now, users can set content type explicitly for their files in a number of ways, or rely on automatic file-extension content types. Proxied files default to automatic file-extension content types, but then fall back to the content type of the resource they proxy to. There is also a bug fixed around correctly setting content type inside send_file. Fixes #821.
2013-04-06 15:11:25 -07:00
Ben Hollis 6672c1c324 Merge branch '3.0-stable' 2013-03-10 16:32:55 -07:00
Kevin McCarthy 7608275089 Fix dynamic multi-byte utf-8 files rebuilding.
Thor compares the new contents with the existing file by using
File.binread(destination) == new_content.
File.binread returns a string with ASCII_8BIT encoding, which will not
match the new_content if new_content contains multi-byte utf-8.

This patch simply encodes the new_content to ASCII_8BIT before passing
it to Thor.
2013-03-03 18:13:41 -08:00
Ben Hollis 4fe22e3fb5 Move more things over to new configs. Don't let root be configured 2012-10-13 22:37:24 -07:00
Thomas Reynolds 446aa6a4ba Clean up whitespace, play with cane for testing style quality and code complexity 2012-08-13 15:41:07 -07:00
Ben Hollis 62fa17cf1a Reduce work converting paths from relative to absolute and back again 2012-07-19 01:18:55 -07:00
Thomas Reynolds 2e5b0d75a9 Use pathname consistently in file watcher 2012-05-26 17:48:58 -07:00
Ben Hollis 64a2933161 Remove duplicate server methods and solve webrick logging in a platform-independent way 2012-05-16 21:19:03 -07:00
Ben Hollis dddd409336 Support Unicode characters in filenames, both in source filenames and in the names of proxied paths. Fixes #332. 2012-04-29 21:42:45 -07:00
Ben Hollis ce9b99ce44 Disable inline minification by default, allow it to be turned on with an option 2012-04-25 23:41:09 -07:00
Thomas Reynolds bd9814965e Move 3rd party CLI out of fixtures 2012-04-16 15:38:26 -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
Thomas Reynolds e769477e93 Implied extensions. Closes #304 2012-03-29 18:22:43 +01: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
Ben Hollis c5063c1e35 Fix builder steps to properly copy configs, and add a new scenario that shows build --clean not working right when the build directory is set to a nested path. When a path is ignored, it doesn't get removed - in fact, no unused paths will get removed, this is just the easiest way to show it in a test. 2012-01-04 22:54:20 -08:00
Thomas Reynolds 20fea1bab1 refactor file change api, add a disable-watcher command line option for heroku/hosted 2012-01-02 13:48:07 -08:00
Thomas Reynolds 50b9ad7b28 use aruba for server tests too 2011-12-31 13:44:50 -08:00
Thomas Reynolds aee8e32524 test sitemap removal 2011-12-31 12:56:17 -08:00
Thomas Reynolds c8a134a386 split into middleman-core and middleman-more 2011-12-29 15:09:51 -08:00