Pass Variable to Tiddlywiki.Info Configuration File

Can I pass a variable like version to my tiddlywiki.info file?

Example:

    "build": {
        "index": [
            "--output","5.2.5/",	
            "--rendertiddler",
            "$:/plugins/tiddlywiki/tiddlyweb/save/offline",
            "vanilla.html",
            "text/plain",

I want to use something like this

 "--output","version",	

I know PublishFilter is a variable and $:/plugins/tiddlywiki/tiddlyweb/save/offline is a template!

Is there any document describe how to create and work tiddlywiki.info?
Is there any plan to use tiddlywiki.json instead of tiddlywiki.info? JSON is a defacto standard here and can be a good upgrade from .info

Hi @atronoush you can use the new --commands command introduced in v5.2.4 to dynamically create command tokens from filters:

"build": {
        "index": [
            "--commands","[[--output]] [<version>addsuffix[/]]",
            "--rendertiddler",
            "$:/plugins/tiddlywiki/tiddlyweb/save/offline",
            "vanilla.html",
            "text/plain",

The docs are here - https://tiddlywiki.com/#CommandsCommand

2 Likes

Thank you Jeremy!
This works perfect for me! Using variables/filters from TW itself in .info file gives a great flexibility.