From f979da941aa180cdf7d6a731a530ceef231b752a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 16 Jan 2024 16:09:36 +0000 Subject: [PATCH] Initial Commit --- .../tiddlywiki/classictools/modules/recipe.js | 9 ++++ .../tiddlywiki2.externaljs.template.html.tid | 8 ++-- .../templates/tiddlywiki2.template.html.tid | 42 +++++++++---------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/plugins/tiddlywiki/classictools/modules/recipe.js b/plugins/tiddlywiki/classictools/modules/recipe.js index 5b3a0b019..aa5362887 100644 --- a/plugins/tiddlywiki/classictools/modules/recipe.js +++ b/plugins/tiddlywiki/classictools/modules/recipe.js @@ -69,6 +69,15 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) { }, sourcePath = fields.title; // Bit of a hack to take advantage of the default title being the path to the tiddler file processRecipe(sourcePath,text); + // Add a $:/RecipeTiddlers tiddler with the titles of the loaded tiddlers in order + var titles = []; + $tw.utils.each(tiddlers,function(tiddler) { + titles.push(tiddler.title); + }); + tiddlers.push({ + title: "$:/RecipeTiddlers", + list: $tw.utils.stringifyList(titles) + }); return tiddlers; }; diff --git a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid index 980000027..12795f44a 100644 --- a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid +++ b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.externaljs.template.html.tid @@ -1,7 +1,7 @@ title: $:/core/templates/tiddlywiki2.externaljs.template.html -{{{ [prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prejs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{js}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postjs}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} diff --git a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid index d2dcc1f0b..fb65d1615 100644 --- a/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid +++ b/plugins/tiddlywiki/classictools/templates/tiddlywiki2.template.html.tid @@ -6,35 +6,35 @@ title: $:/core/templates/tiddlywiki2.template.html -{{{ [prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prehead}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{title}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{posthead}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{prebody}]] ||$:/core/templates/plain-text-tiddler}}}
@@ -46,39 +46,39 @@ Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jerem
-{{{ [prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} +{{{ [list[$:/RecipeTiddlers]prefix[{shadow}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
-{{{ [prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} -{{{ [prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{tiddler}]] +[sortcs[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}} +{{{ [list[$:/RecipeTiddlers]prefix[{plugin}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{posttiddlers}]] ||$:/core/templates/plain-text-tiddler}}}
-{{{ [prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postbody}]] ||$:/core/templates/plain-text-tiddler}}} -{{{ [prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} +{{{ [list[$:/RecipeTiddlers]prefix[{jsext}]] ||$:/core/templates/plain-text-tiddler-strip-comments}}} -{{{ [prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}} +{{{ [list[$:/RecipeTiddlers]prefix[{postscript}]] ||$:/core/templates/plain-text-tiddler}}}