Revisiting mime-types and file extensions
Thomas Nichols
nichols7 at googlemail.com
Thu Jun 14 12:45:04 EDT 2007
Hi,
I'm in the process of adding support for Markdown to a minimal CMS in
Rails, [Railfrog][railfrog], which uses mime types to select appropriate
processing. I have had a look through the archives but have not been
able to see that a consensus has emerged as to what such a mime type for
Markdown should look like. My reading of the RFCs suggests that it
should be within the "text/*" media type, and it looks as though we
could with impunity use our own mime type of, say,
text/vnd.railfrog.markdown
but this does seem most inelegant. The [registration procedures][reg]
do not seem unduly long-winded, and a mime-type of
text/markdown
seems entirely suitable, alongside text/rtf and text/html. This would, I
believe, mean 'registration in the IETF tree' -- does that seem
appropriate for Markdown?
The ['text' media type][texttype] looks like the right place if I have
understood correctly; however, if registration at the top level appears
problematic then it should be entirely feasible to register in the
'vendor' tree:
* text/vnd.markdown.basic
* text/vnd.markdown.maruku
* etc.
If I read this correctly, no consultation process is then required.
Using the "experimental" types indicated by 'x.' and 'x-' might also be
a possibility in the short term, but is not recommended; a properly
registered mime type in the main tree would provide a clear
standardisation. Is this important enough to anyone else to warrant an
attempt to register a name? Or should we just create a solution specific
to our own problem domain?
In Railfrog we also allow content to be loaded from the file system,
with the mime type being inferrred from the file extension. Having
reviewed the archives, our current intent is to load as Markdown any
files with the extensions
* .markdown
* .mdtext
* .mdml (from [file-extensions], though not at http://www.filext.com)
Any suggestions for others we should also be handling?
Any comments/flames would be most welcome - and many thanks to everyone
who has worked to keep Markdown so clear and simple!
Thomas.
[railfrog]: http://www.railfrog.com/
[reg]: http://www.mhonarc.org/~ehood/MIME/2048/rfc2048.html#2.1
[texttype]: http://www.mhonarc.org/~ehood/MIME/2046/rfc2046.html#4.1
[file-extensions]: http://www.file-extensions.org/mdml-file-extension
More information about the Markdown-Discuss
mailing list