an option to load mime types table from apache #217

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

darwin commented Sep 20, 2010

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`
31d395e

@tombell tombell commented on the diff May 31, 2012

bin/jekyll
@@ -161,8 +165,12 @@ if options['server']
FileUtils.mkdir_p(destination)
- mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
- mime_types.store 'js', 'application/javascript'
+ unless options['mime']
+ mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
+ mime_types.store 'js', 'application/javascript'
+ else
+ mime_types = WEBrick::HTTPUtils::load_mime_types(options['mime'])
@tombell

tombell May 31, 2012

Contributor

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.

Owner

parkr commented Dec 8, 2012

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?

Owner

parkr commented Feb 23, 2013

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

parkr closed this Mar 8, 2013

parkr referenced this pull request Mar 8, 2013

Merged

Load in Apache MIME Types #847

jekyllbot locked and limited conversation to collaborators Feb 27, 2017

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