The “plain” encoding represents a zettel the same way it is stored in a file with an extension .zettel.
Zettel with a syntax value “zmk” are typically stored in a file with the extension .zettel. Storing zettel with other syntax values in a .zettel file is also possible, but not recommended. In those cases, the zettel is stored in two files: one file (without a filename extension) contains the metadata, and the other stores the zettel content.
These two cases are mirrored by specifying the required part of a zettel:
- If part has the value “zettel”, the full zettel, both metadata and content, is encoded. This corresponds to storing a zettel in a single file with the extension .zettel.
- A part value of “meta” encodes only the metadata of a zettel.
- A part value of “content” (the default) encodes the raw content of a zettel.
If transferred via HTTP, the content type depends on the selected part:
- If part has the value “zettel”, the content type is either application/octet-stream (for binary content) or a value derived from the syntax metadata.
- A part value of “content” results in a content type is derived from the syntax metadata.
- A part value of “meta” results in a content type text/plain; charset=utf-8.