1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-24 06:13:17 +00:00

Ensure themes get initialised on the server as well as the browser

To make sure that static site generation has access to the theme shadow
tiddlers
This commit is contained in:
Jeremy Ruston 2013-04-30 23:04:15 +01:00
parent debf29d391
commit c373fea350

View File

@ -32,6 +32,8 @@ exports.startup = function() {
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
// Set up the command modules
$tw.Commander.initCommands();
// Kick off the theme manager
$tw.themeManager = new $tw.ThemeManager($tw.wiki);
// Get the default tiddlers
var defaultTiddlersTitle = "$:/DefaultTiddlers",
defaultTiddlersTiddler = $tw.wiki.getTiddler(defaultTiddlersTitle),
@ -89,8 +91,7 @@ exports.startup = function() {
document.addEventListener("tw-clear-password",function(event) {
$tw.crypto.setPassword(null);
});
// Kick off the theme and the stylesheet manager
$tw.themeManager = new $tw.ThemeManager($tw.wiki);
// Kick off the stylesheet manager
$tw.stylesheetManager = new $tw.utils.StylesheetManager($tw.wiki);
// If we're being viewed on a data: URI then give instructions for how to save
if(document.location.protocol === "data:") {