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:
committed by
Jeremy Ruston
parent
feace8d26b
commit
a2c764d407
@@ -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)});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user