Mimetype for Asciidoc

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mimetype for Asciidoc

Hocdoc
I want to integrate the Asciidoc format to the Apache Tika project, which can be used in the JVM world to autodetect the file format from the extension or the content of the file.

Is there already an official (or used) mimetype for Asciidoc?
Should I use "text/x-asciidoc" for Asciidoc?
Reply | Threaded
Open this post in threaded view
|

Re: Mimetype for Asciidoc

mojavelinux
Administrator
On Tue, May 21, 2013 at 1:07 AM, Hocdoc [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I want to integrate the Asciidoc format to the Apache Tika project,

​First, awesome!​

 
which can be used in the JVM world to autodetect the file format from the extension or the content of the file.

Is there already an official (or used) mimetype for Asciidoc?

​Not that I know of.​

 
Should I use "text/x-asciidoc" for Asciidoc?

​I'm going to say yes based on recommendations from this StackOverflow post about a mimetype for Markdown:


-Dan​

--
Reply | Threaded
Open this post in threaded view
|

Re: Mimetype for Asciidoc

Hocdoc
Ok, thanks, I have added ticket TIKA-1123 in the Tika issue tracker for this.

I will use this mimetype in my Tika/Asciidoctor-project:

<mime-type type="text/x-asciidoc">
  <_comment>Asciidoc source code</_comment>
  <glob pattern="*.asciidoc"/>
  <glob pattern="*.adoc"/>
  <glob pattern="*.ad"/>
  <glob pattern="*.ad.txt"/>
  <glob pattern="*.adoc.txt"/>
  <sub-class-of type="text/plain"/>
</mime-type>
Reply | Threaded
Open this post in threaded view
|

Re: Mimetype for Asciidoc

getreu
In reply to this post by Hocdoc
According to this  RfC 6648
http://www.rfc-editor.org/bcp/bcp178.txt 


The `/etc/mime.types` entry should be:
     text/asciidoc                                  adoc asciidoc

There is an issue with the firefox plug-in. Once the new mime type enabled, the plugin does not render any more. Chrome and chromium do.
Reply | Threaded
Open this post in threaded view
|

Re: Mimetype for Asciidoc

getreu
Reply | Threaded
Open this post in threaded view
|

Re: Mimetype for Asciidoc

mojavelinux
Administrator
Sounds reasonable to me. I never understood why the x- prefix was used. Now I know the story and that it is being deprecated.

Cheers,

-Dan

On Sun, Dec 20, 2015 at 5:05 AM, getreu [via Asciidoctor :: Discussion] <[hidden email]> wrote:
https://github.com/asciidoctor/asciidoctor-firefox-addon/issues/42


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Mimetype-for-Asciidoc-tp211p4119.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen