I intend to make the sample change to the link widget as well.Īnother update that refactors things to allow the same sitemap tiddlers to drive the web server. For example, the sitemap above uses addprefixaddsuffix]. The image widget is updated to support a new tv-image-template-filter filter for converting tiddler titles into URLs. There's currently no way to trigger it from the browser. There is also a new "filesystem" publisher module. For example, the JSZip plugin ought to be able to work under Node.js but currently uses browser techniques to download the finished zip file. There are a number of rough edges to explore and fix. This update adds initial support for Node.js. At the moment, only JS code triggering the modal can update the progress bar, but that might be something we want to extend. The modal mechanism is extended to support an optional progress bar. Previously, the JS code didn't know about any of that, it just supported messages for publishing individual routes, assembled in an elaborate action string. The idea is that sitemaps can be shared across different jobs, and routes can be shared across different sitemaps. For example: title: $:/core/routes/StaticSite/Images The list field lists the routes that make up the sitemap. Note that fields prefixed var- are passed as variables to the rendering process, without the var- part. ![]() Var-tv-image-template-filter: addprefixaddsuffix] Var-tv-wikilink-template-filter: addsuffix] List: $:/core/routes/StaticSite/Index $:/core/routes/StaticSite/HTML $:/core/routes/StaticSite/Images $:/core/routes/StaticSite/Styles The sitemap tiddlers look like this: title: $:/core/sitemaps/StaticSiteĭescription: The original TiddlyWiki 5 static file layout (The prefix is just to keep the size of the export down in my testing it's still quite a few megabytes). They look like this: title: $:/config/PublishingJobs/DefaultĮxport-filter: !isprefix] !is] Publishing job tiddlers define the tiddlers to be published and the publisher and sitemap to be used. Data model refactoringįirst, the tiddlers describing the publishing job have been refactored so that they can more easily be reused. Possibly add a generic POST/PUT publisher module.Add a publisher module for TiddlyDesktop.The -output command would become a synonym for -publish filesystem Consider extending the save and render commands to use the publishing framework.Extend the "listen" command to be able to use route configuration tiddlers.Make it possible to invoke Node.js-based publishers from the browser.Add support for Node.js-based publisher modules.Add mechanism to remove files in the output folder that are no longer needed.Properly deal with errors raised by the publisher modules (at the moment it's best to keep an eye on the JS console).Improving the control panel UI so that entities can be created and removed as well as edited.Improve the feedback report provided after publishing.Add a cancel button to the publishing modal.Integrate the progress bar with the existing modal dialogue mechanism.Update the link widget so that it can optionally mangle its target with a filter for static site generation (an updated version of the existing tv-wikilink-template variable).Refactoring the configuration tiddlers so that they can be reused more easily.Making it possible to pass arbitrary variables to a route.This is needed so that the publisher module under development for Fission can be injected into a wiki and bring its customisation user interface with itĮverything is pretty basic at the moment. A new framework for TiddlyWiki's JavaScript modules to expose translatable strings.A browser-based publisher module in the JSZip plugin that can publish an entire static site as a ZIP file that is automatically downloaded by the browser.A new framework for executing long running tasks while displaying a progress bar, and without locking up the user interface.A new page control button to initiate publishing through the current static file routes.A new control panel tab exposing the installed static file routes (see below for screenshots).I also plan to make the same framework function under Node.js both for generating static sites and for serving custom site configurations over HTTP. This PR aims to make static site generation user friendly and practical in the browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |