In summary, if anyone wants to write a guide, to adjust filenames and links
(for single file wikis) I recommend this process as per my current
understanding:
1. create a tiddler called $:/config/static/export-link-filter and place
here the filter that will operate on the tiddler title to transform it as
you like, this filter will receive the tiddler title as input. For example:
[split[ ]join[-]encodeuricomponent[]addsuffix[.html]]
2. use this filter in the code for your export button:
\define actions-render-static-site()
<$action-sendmessage $message="tm-zip-create" $param="$:/temp/_ZipTiddler"/>
<$list filter="[all[tiddlers]!is[system]limit[100]]">
<$action-sendmessage $message="tm-zip-render-file" $param=
"$:/temp/_ZipTiddler" filename={{{ [<currentTiddler>subfilter{$:/config/
static/export-link-filter}] }}} tiddler=<<currentTiddler>> template=
"$:/core/templates/static.tiddler.html"/>
</$list>
<$action-sendmessage $message="tm-zip-render-file" $param="$:/temp/
_ZipTiddler" filename="static.css" template="$:/core/templates/static.
template.css"/>
<$action-sendmessage $message="tm-zip-download" $param="$:/temp/_ZipTiddler"
filename="myzip.zip"/>
\end
<$button actions=<<actions-render-static-site>>>
Render site
</$button>
3. Create a tiddler called $:/config/static/tv-filter-export-link, with the
tag $:/tags/Macro and the content:
\define tv-filter-export-link() [subfilter{$:/config/static/export-link-
filter}]
This is the same process as what I outlined earlier *except, you write the
filter once and refer to it in both places*, reducing the chances of error.
Hope this helps,
Saq
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/58c121f1-b0b2-403a-9fe5-1749a02b2b57%40googlegroups.com.