Markdown Frontmatter (instead of meta files)

I noticed that TiddlyWiki prefers sidecar meta files for metadata, rather than using Markdown frontmatter to store this information. This makes sense for binary files, but Markdown frontmatter seems more flexible (lots of other tools use frontmatter).

Is there any way to use frontmatter instead of meta files?

1 Like

Note how the remaining tiddlers (without .meta companions) are structured:

created: 20131129090249275
modified: 20220819041016415
tags: [[Working with TiddlyWiki]] Welcome
title: GettingStarted
type: text/vnd.tiddlywiki

The easiest way to use ~TiddlyWiki is to sign up for a free account with 
[[Tiddlyhost|https://tiddlyhost.com/]], an independently run community service.
If you find Tiddlyhost useful, please consider 
[[donation or sponsorship|https://tiddlyhost.com/donate]].

Click here to download an empty copy of ~TiddlyWiki: 
{{$:/editions/tw5.com/snippets/download-empty-button}}

<!-- ... more content elided ... -->

(I added some linebreaks for readability.)

This is very similar to Markdown front-matter implementations. It is a quite readable format, both by machines and people. And it is a long-standing mechanism, not likely to change soon. The start of the file is a collection of colon-separated name/value pairs, one per line, each representing a field in the tiddler. After a blank line, the remainder of the file is the text field.

The .meta files are simply for those cases when the main content cannot include – or cannot comfortably include – our metadata. They have the same structure, but their content is taken from the companion files.

I ported a wiki to a system that disallowed committing files with the extension .meta. The only images I had were were SVG (i.e. text) and a favicon.ico. Except for my favicon.ico, I was simply able to move the headers from the .meta files into the tops of my images, CSS, MD, and JSON files, and everything worked fine.

You can always reformat any imported Markdown files this way.

I think this is a fairly simple system: a really readable/modifiable format for simple text tiddlers, and a wrapper file for files we cannot or do not want to prefix with our metadata.

Need someone knows coding to push [IDEA] Store markdown tiddler with YAML metadata instead of .meta file · Issue #7534 · TiddlyWiki/TiddlyWiki5 · GitHub

Will you be the one :wink:

Probably not. I’m not particularly convinced about the need. I think I would be more inclined to consider creating importers and exporters for Obsidian files than in creating a new tiddler format. The multiline fields would be the only feature I can see that might convince me otherwise.