1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-17 07:47:24 +00:00

enable doc contributions for dev (#3047)

* enable doc contributions for dev

fixes #2921

* involves changes to boot.js to properly build OriginalTiddlerPaths on
Windows
* added ContributionBanner
* added Sources tab to info panel
* updated tiddlywiki.info for dev

* normalize path separator to posix for windows

* more generically transform to posix
This commit is contained in:
Tobias Beer
2017-12-12 14:50:33 +01:00
committed by Jeremy Ruston
parent feace8d26b
commit a2c764d407
4 changed files with 52 additions and 2 deletions

View File

@@ -1806,9 +1806,13 @@ $tw.loadWikiTiddlers = function(wikiPath,options) {
// Save the original tiddler file locations if requested
var config = wikiInfo.config || {};
if(config["retain-original-tiddler-path"]) {
var output = {};
var output = {}, relativePath;
for(var title in $tw.boot.files) {
output[title] = path.relative(resolvedWikiPath,$tw.boot.files[title].filepath);
relativePath = path.relative(resolvedWikiPath,$tw.boot.files[title].filepath);
output[title] =
path.sep === path.posix.sep ?
relativePath :
relativePath.split(path.sep).join(path.posix.sep);
}
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/json", text: JSON.stringify(output)});
}