Adding code snippets to TiddlyWiki documentation or otherwise

I think there is an established mechanism to work with “examples” for reference documentation. It’s how Filter Operators work.

eg:

  • There is an “all Operator” tiddler and
  • “all Operator (Examples)” tiddler

The former contains the reference docs. The later contains all examples. In all Operators there is a macro call at the end of the text: <<.operator-examples "all">> … This macro uses the “all” parameter and creates the link.

You are right. That macro call could be part of a template, but that would be a different undertaking.

So my suggestion is

  • We create a similar macro <<.message-examples "tm-add-field">>
  • Which links to a new tiddler: WidgetMessage: tm-add-field (Examples)
  • Those example tiddlers may be constructed in a way you describe here

It will be important to have a closer look at: https://tiddlywiki.com/#Documentation%20Style%20Guide

The mechanism, how to tackle a change like this is described at: 7 Steps to Improve the TiddlyWiki Documentation

have fun!
Mario