Nice solution Saq, It would be nice if someone summarize the final solution as a step wize procedure!
Cheers Mohammad On Saturday, May 9, 2020 at 12:25:59 PM UTC+4:30, Saq Imtiaz wrote: > > Regarding file names, it pays off to look at what your code is trying to > do ;) > > Pay attention to the highlighted line below, this is the parameter to the > tm-zip-render-file message that provides the file name. > > \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>encodeuricomponent[] > addsuffix[.html]] }}} 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> > > currentTiddler is the tiddler title and in triple braces you have a > filter manipulating the tiddler title. For example, > [<currentTiddler>split[ ]join[-]addsuffix[.html]] > > will replace spaces with dashes in the tiddler titles. You may also wish > to encodeuricomponent after that as well. See > https://tiddlywiki.com/#Filter%20Operators > > > Now you need to get your links to match, for which you need to set the > tv-filter-export-link variable. See > https://tiddlywiki.com/#tv-filter-export-link%20Variable > > Create a tiddler and give it the tag $:/tags/Macro and the content: > \define tv-filter-export-link() [split[ ]join[-]encodeuricomponent[] > addsuffix[.html]] > > The logic in this filter assumes it is being provided with the tiddler > title as input. With that exception only, it should match the filter you > set for filenames. > > That should do the trick. Do check the syntax for potential errors if it > doesn't, as this is untested code. > Regards, > 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/57deb24b-5b70-4b23-897a-72c0854ad896%40googlegroups.com.