Can InnerWiki create wikis that use the external core?

I find InnerWiki very useful to easily make bespoke wikis.

I do understand it’s payload system.

What I don’t understand is how to alter the default payload all wikis get such that they won’t get the core and don’t get the InnerWiki plugin itself.

In particular …

Q: How can I make TW’s through InnerWiki that use the external core?

(ASSUME: the external core is already in the same directory as that which the InnerWiki makes wikis in)

TT

id erm guess you must mean

var DEFAULT_INNERWIKI_TEMPLATE = $:/plugins/tiddlywiki/innerwiki/template ?

my guess is you could try and
compare(diff??!!) $:/plugins/tiddlywiki/innerwiki/template with the external core template

or compare any other template with ext-core.js

and copy
whatever changes
(presumably core<script removes inline code and adds ext-core.js resource path)
to the inner template!?..

well i found after opening

$:/plugins/tiddlywiki/innerwiki/template
that it contains

\define saveTiddlerFilter()
$:/core
$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite
$:/themes/tiddlywiki/vanilla
\end
{{$:/core/templates/tiddlywiki5.html}}

and $:/core/save/all-external-js

\whitespace trim
\import [subfilter{$:/core/config/GlobalImportFilter}]
\define saveTiddlerFilter()
[is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$
\end

<!-- Important: core library is provided by serving URI encoded $:/core/templates/tiddlywiki5.js -->
\define defaultCoreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js

<$let coreURL={{{ [[coreURL]is[variable]then<coreURL>else<defaultCoreURL>] }}}>
	{{$:/core/templates/tiddlywiki5-external-js.html}}
</$let>

the : all-external-js , saveTiddlerFilter macro
appears to
(i guess) minus ‘-’ prefixing filter is remove
and is used to exclude things contained in $:/core/templates/tiddlywiki5.js

so perhaps

smoothing like
this

\define saveTiddlerFilter()
-[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/core]] -[[$:/boot/boot.css]] -[is[system]type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]]
$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite
$:/themes/tiddlywiki/vanilla
\end

<!-- Important: core library is provided by serving URI encoded $:/core/templates/tiddlywiki5.js -->
\define defaultCoreURL() %24%3A%2Fcore%2Ftemplates%2Ftiddlywiki5.js

<$let coreURL={{{ [[coreURL]is[variable]then<coreURL>else<defaultCoreURL>] }}}>
	{{$:/core/templates/tiddlywiki5-external-js.html}}
</$let>

which produces content containing

<!--~~ Load external JavaScripts ~~-->
<script src="../../../tiddlywikicore-5.3.8.js" onerror="alert('Error: Cannot load ../../../tiddlywikicore-5.3.8.js');"></script>

:crossed_fingers:
presumably … if the paths are adjusted
for you environment
it might work
or some more alteration for saveTiddlerFilter
might be needed ?!..

:+1:

1 Like

I think you need to do a deep research into the external core if you want be sure the innerwiki to use it, however I would have thought it possible if the calling wiki uses it the innerWiki will as well.

The innerwiki is transient unless you save it, be carful not to overwrite the parent wiki, passing tiddlers with a different save to file name, to the innerwiki is possible.

Mamma Mia!

Deep research is too much!

All I wanted to KNOW is …

  • Can I via InnerWiki create a wiki with an EXTERNAL core?

TT

Okay. Is it that simple! Just minus (–) what is not needed!

I’ll try
TT

tiddlyhost can optionally use external core, install innerwiki on it and see if the resulting inner core uses it. I am sure it’s documented somewhere and you just need to provide the right tiddlers to the innerwiki and start it and check it keeps the external core.

you would ask a technical need, you just need to dig a little deeper.

but why do you want this?

I see that. I never used TiddlyHost because most of my wikis need access to my external image files.

Quick local way to test, to create and to debug wikis, view new themes, test new plugins etc.

InnerWiki is incredibly useful. I’m surprised not to have gotten masses of feedback!

Am I the only person using it? :slightly_smiling_face:

TT

That shouldn’t matter as long as you have the pictures online. They don’t have to be in any particular folder, or any relationship to the main wiki. For instance:

title: Picture 11
type: image/jpeg
_canonical_uri: https://picsum.photos/id/11/300/200

pix.json (490 Bytes)

2 Likes

I haven’t tried it myself. You can give it a try. Use the method described in the post below to customize your innerWiki.

1 Like

“If you want to make a pie from scratch, you must first create the universe” –Carl Sagan

(idk but…) thinking about it , a bit more perhaps
adding

$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite
$:/themes/tiddlywiki/vanilla

to the external core js template???
& removing them from inner-template
and just adding relevant
ext-js-template config to the inner-template

(hope that makes sense?! )

eg i think i just saw an example of
manually adding external script paths

<script src=“https:

in the post above

1 Like

idk :upside_down_face: but i had considered
the potential for minimization of innerwiki
using external-js

… it might be easier to test with a local copy ruining on node **
( aligning paths between client server is always fun but better/easier to debug if you can configure both locally )

** ill probably try the inner wiki plugin on node
when i have time to bork/fix my svr config(s)

1 Like

I think $:/core/templates/tiddlywiki5-external-js.html should be used instead. The original $:/plugins/tiddlywiki/innerwiki/template:

\define saveTiddlerFilter()
$:/core
$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite
$:/themes/tiddlywiki/vanilla
\end
{{$:/core/templates/tiddlywiki5.html}}

becomes

\define saveTiddlerFilter()
$:/core
$:/plugins/tiddlywiki/innerwiki
$:/plugins/tiddlywiki/railroad
$:/themes/tiddlywiki/snowwhite
$:/themes/tiddlywiki/vanilla
\end
\define coreURL() https://tiddlywiki.com/tiddlywikicore-5.3.8.js
{{$:/core/templates/tiddlywiki5-external-js.html}}

Adjust https://tiddlywiki.com/tiddlywikicore-5.3.8.js to some relative path if you want.

If the latter template is saved in a tiddler named innerwiki external core template, then this works (I tested at https://tiddlywiki.com/editions/full/ which has the innerwiki plugin):

<$innerwiki template="innerwiki external core template"/>

The innerwiki references the external core and if you save the innerwiki, the resulting html also references the external core.

However, there seems to be an innerwiki bug and child $data widgets are not properly inserted. For example the tiddlers defined by the following data widgets are not present in the innerwiki:

<$innerwiki template="innerwiki external core template">
<$data title="foo" text="bar"/>
<$data title="$:/DefaultTiddlers" text="foo"/>
</$innnerwiki>

I think the reason it isn’t working is because the SPLIT_MARKER is looking for a string in the html which is not present for external core. Since the SPLIT_MARKER isn’t found, the data tiddlers are not implanted. See this code:

@TW_Tones is right. Coming up with my answer required researching the external core. Looks like @wiki_user researched the same.

Great reply! Thank you! I now know what to try.

Especially on the above which I might of thought my coding fault, not the system’s.

TT

Personal side note on this…

Agreed. I should have kept schtum.

The truth is reading JavaScript source code is way beyond me.

BUT I am truly grateful you folk can!

TT

I’m not claiming the research in this case is easy, but I want to be clear that until I encountered the bug, no javascript reading was required.

I found the answer by starting with these wikitext tiddlers and following the trail of transclusions:

  • $:/core/save/all
  • $:/core/save/all-external-js
  • $:/plugins/tiddlywiki/innerwiki/template

Did you create an issue at GitHub?

1 Like

I’ve been reading your posts for years, including many, many dictionary references. I read widely, and believe I have a fairly large vocabulary. This is the first time you’ve supplied a word I didn’t know. Thank you. I’ll have to remember that one!

I started doing them because we write in somewhat limited “computer English” here and, as an English teacher abroad, realizing many folk on this group are not native English speakers, I thought it useful to them to give a few extra words with their definitions.

Animus in consulendo liber
TT

2 Likes

I think it is a Yiddish word derived from the German “stumm” …

Der Junge war stumm und schwachsinnig.

… that took hold in UK in 1950s.

Side comment
TT