diff --git a/.vuepress/configs/sidebar/en.ts b/.vuepress/configs/sidebar/en.ts index 69be58484ff..71cc1c28e49 100644 --- a/.vuepress/configs/sidebar/en.ts +++ b/.vuepress/configs/sidebar/en.ts @@ -252,6 +252,7 @@ export const sidebarEn: SidebarConfig = { '/lang-guide/chapters/strings_and_text.md', '/lang-guide/chapters/helpers_and_debugging.md', '/lang-guide/chapters/pipelines.md', + '/lang-guide/chapters/mime_types.md', ], }, ], diff --git a/lang-guide/chapters/mime_types.md b/lang-guide/chapters/mime_types.md new file mode 100644 index 00000000000..6ac905ea9fd --- /dev/null +++ b/lang-guide/chapters/mime_types.md @@ -0,0 +1,21 @@ +# MIME Types for Nushell + +[MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types), +also known as media or content types, are used to identify data formats. +Since Nushell is not officially recognized by the _Internet Assigned Numbers +Authority (IANA)_, all Nushell MIME types are prefixed with "-x" to indicate +their unofficial status. +Despite this, some tools still rely on MIME types to identify data formats. + +The three MIME types we define and recommend for consistent use are: + +- **`application/x-nuscript`:** + This type is used for Nushell scripts and is similar to + `application/x-shellscript` for Bash scripts. + The "application" type is used because these scripts can be executable if the + correct shebang is included. +- **`text/x-nushell`:** + This is an alias for `application/x-nuscript` but emphasizes that the script + is human-readable, similar to `text/x-python`. +- **`application/x-nuon`:** + This type is used for the [NUON data format](../../book/loading_data.html#nuon).