an option to load mime types table from apache #217

wants to merge 1 commit into

3 participants


No description provided.

@darwin darwin allow --mime config option which loads mime table from Apache compati…
…ble mime.types file

sample usage: `jekyll --server --mime /private/etc/apache2/mime.types`
@tombell tombell commented on the diff May 31, 2012
@@ -161,8 +165,12 @@ if options['server']
- mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
- 'js', 'application/javascript'
+ unless options['mime']
+ mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
+ 'js', 'application/javascript'
+ else
+ mime_types = WEBrick::HTTPUtils::load_mime_types(options['mime'])
tombell May 31, 2012

Might be worth checking if the file actually exists before attempting to load it, and display a graceful error message if it doesn't exist.

Jekyll member

Suuuuuper like. But do heed @tombell's warning in the diff -- check if the file exists and gracefully degrade to defaults if it's not found and display error message?

Jekyll member

On the docket for 1.0... sort of. We're going to supply our own mime types file.

@parkr parkr closed this Mar 8, 2013
@parkr parkr referenced this pull request Mar 8, 2013

Load in Apache MIME Types #847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment