Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the suggested mime type and file extension? #3098

Closed
toastal opened this issue Jun 3, 2022 · 4 comments · Fixed by #4485
Closed

What is the suggested mime type and file extension? #3098

toastal opened this issue Jun 3, 2022 · 4 comments · Fixed by #4485
Labels
Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug

Comments

@toastal
Copy link

toastal commented Jun 3, 2022

If I were to keep Mermaid graphs in a separate file and include them, what file extension would that me? If I were to serve that file from a web server, what is the mime type?

I did not find anything about this in the docs.

@toastal toastal added the Type: Other Not an enhancement or a bug label Jun 3, 2022
@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Jun 3, 2022
@theanurin
Copy link

+1

@h0lg
Copy link

h0lg commented Apr 27, 2023

I'm suggesting file extension .mmd and MIME type text/mmd.

@bollwyvl
Copy link
Contributor

Not to flog this too much, but it really would be helpful for broader, consistent adoption of mermaid by downstreams. While going through the full IANA process is... a lot, just having a note on the main documentation website would be sufficient for moving forward. Perhaps a concrete PR to the docs would be the most effective way forward.

I'm suggesting file extension .mmd

This is a fine, and is generally used both in this repo and in the wild. .mmd is already registered for a karaoke config file, but the chances of collision seem small.

MIME type text/mmd

This may be a bit too terse. Perhaps something more searchable would be useful if one found a random file-on-the-wire:

  • text/mermaid
  • text/mermaid-js

Or, with the vnd. prefix, as the venerable graphviz is registered:

  • text/vnd.mermaid
  • text/vnd.mermaid-js

Another path altogether, as mermaid does (optionally) embed a modified subset of markdown, might be to consider documenting a markdown variant string, which has a separate registry, and also requires the charset:

  • text/markdown; charset=UTF-8; variant=MermaidJS

However, this is unattractive, as basically no other markdown engine would work with such a document outside of the widely-used fenced code block syntax, or one of the less-supported syntaxes.

@bollwyvl
Copy link
Contributor

Opened #4485

sidharthv96 added a commit that referenced this issue Jun 13, 2023
…-mime

Document recommended file extension and MIME type docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants