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)

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