mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Merge remote-tracking branch 'upstream/master' into fred
This commit is contained in:
commit
6a8c0a25b5
@ -1,13 +0,0 @@
|
||||
title: GettingStarted
|
||||
|
||||
Welcome to TiddlyWiki, the non-linear personal web notebook.
|
||||
|
||||
To get started, first verify that you can save changes successfully - see http://tiddlywiki.com/ for detailed instructions.
|
||||
|
||||
Then you can:
|
||||
|
||||
* Create new tiddlers using the 'plus' button in the sidebar
|
||||
* Visit the [[control panel|$:/ControlPanel]] using the 'cog' button in the sidebar to customise your wiki
|
||||
** Stop this message appearing by changing the default tiddlers under the ''Basics'' tab
|
||||
* Save changes using the 'download' button in the sidebar
|
||||
* Learn more about [[WikiText|http://tiddlywiki.com/static/WikiText.html]]
|
20
core/language/en-GB/GettingStarted/GettingStarted Step 1.tid
Normal file
20
core/language/en-GB/GettingStarted/GettingStarted Step 1.tid
Normal file
@ -0,0 +1,20 @@
|
||||
title: GettingStarted (Step 1)
|
||||
tags: $:/tags/GettingStarted
|
||||
caption: Step 1<br>Saving
|
||||
|
||||
! Saving Changes
|
||||
|
||||
Before you can start storing important information in ~TiddlyWiki it is important to make sure that you can reliably save changes.
|
||||
|
||||
# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right
|
||||
# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler
|
||||
# Click the red {{$:/core/images/save-button}} in the sidebar on the right
|
||||
|
||||
What happens next will depend on how you've set up ~TiddlyWiki:
|
||||
|
||||
* If you've installed the ~TiddlyFox add-on for Firefox, your changes should immediately be saved back to the file
|
||||
* If you're running ~TiddlyDesktop, again the changes will be saved instantly
|
||||
* If you're using Chrome, you'll need to follow the [ext[instructions on tiddlywiki.com|http://tiddlywiki.com#GettingStarted%20-%20Chrome]]
|
||||
* For other browsers, see the relevant [ext[instructions on tiddlywiki.com|http://tiddlywiki.com#GettingStarted]]
|
||||
|
||||
Finally, refresh the page in the browser to and verify that the new tiddler has been correctly saved.
|
11
core/language/en-GB/GettingStarted/GettingStarted Step 2.tid
Normal file
11
core/language/en-GB/GettingStarted/GettingStarted Step 2.tid
Normal file
@ -0,0 +1,11 @@
|
||||
title: GettingStarted (Step 2)
|
||||
tags: $:/tags/GettingStarted
|
||||
caption: Step 2<br>Customising
|
||||
|
||||
! Customising your ~TiddlyWiki
|
||||
|
||||
~TiddlyWiki's great strength is the ability to customise it
|
||||
|
||||
# Click the {{$:/core/images/options-button}} button in the sidebar on the right to bring up the control panel
|
||||
# Enter text for the site title and subtitle
|
||||
# Remove this "~GettingStarted" tiddler by editing the default tiddlers in the ''Basics'' tab
|
7
core/language/en-GB/GettingStarted/GettingStarted.tid
Normal file
7
core/language/en-GB/GettingStarted/GettingStarted.tid
Normal file
@ -0,0 +1,7 @@
|
||||
title: GettingStarted
|
||||
|
||||
Welcome to ~TiddlyWiki and the ~TiddlyWiki community
|
||||
|
||||
Visit http://tiddlywiki.com/ to find out more about ~TiddlyWiki and what it can do.
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/GettingStarted]!has[draft.of]]" "GettingStarted (Step 1)" "$:/state/tabs/gettingstarted" "tc-vertical">>
|
@ -26,7 +26,7 @@ Command.prototype.execute = function() {
|
||||
var fs = require("fs"),
|
||||
path = require("path");
|
||||
// Check that we don't already have a valid wiki folder
|
||||
if($tw.boot.wikiTiddlersPath) {
|
||||
if($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {
|
||||
return "Wiki folder is not empty";
|
||||
}
|
||||
// Loop through each of the specified editions
|
||||
|
@ -26,6 +26,8 @@ exports.field = function(source,operator,options) {
|
||||
if(text !== null && !operator.regexp.exec(text)) {
|
||||
results.push(title);
|
||||
}
|
||||
} else {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -35,6 +37,8 @@ exports.field = function(source,operator,options) {
|
||||
if(text !== null && text !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
} else {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ exports.has = function(source,operator,options) {
|
||||
var results = [];
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === "")) {
|
||||
if(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === ""))) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
@ -139,4 +139,21 @@ exports.isDirectory = function(dirPath) {
|
||||
return fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();
|
||||
};
|
||||
|
||||
/*
|
||||
Check if a path identifies a directory that is empty
|
||||
*/
|
||||
exports.isDirectoryEmpty = function(dirPath) {
|
||||
if(!$tw.utils.isDirectory(dirPath)) {
|
||||
return false;
|
||||
}
|
||||
var files = fs.readdirSync(dirPath),
|
||||
empty = true;
|
||||
$tw.utils.each(files,function(file,index) {
|
||||
if(file.charAt(0) !== ".") {
|
||||
empty = false;
|
||||
}
|
||||
});
|
||||
return empty;
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -1,15 +1,21 @@
|
||||
title: $:/core/macros/toc
|
||||
tags: $:/tags/Macro
|
||||
|
||||
\define toc-caption()
|
||||
<$set name="tv-wikilinks" value="no">
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
\define toc-body(rootTag,tag,sort:"",itemClassFilter)
|
||||
<ol class="tc-toc">
|
||||
<$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$]""">
|
||||
<$set name="toc-item-class" filter="""$itemClassFilter$""" value="toc-item-selected" emptyValue="toc-item">
|
||||
<li class=<<toc-item-class>>>
|
||||
<$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/></$view></$link>">
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$list>
|
||||
<$list filter="""[all[current]] -[[$rootTag$]]""">
|
||||
<$macrocall $name="toc-body" rootTag="""$rootTag$""" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
|
||||
@ -39,9 +45,7 @@ tags: $:/tags/Macro
|
||||
{{$:/core/images/down-arrow}}
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$link>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$macrocall $name="toc-expandable" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
|
||||
@ -58,17 +62,13 @@ tags: $:/tags/Macro
|
||||
<$reveal type="nomatch" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="open" class="tc-btn-invisible">
|
||||
{{$:/core/images/right-arrow}}
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="close" class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
@ -106,9 +106,7 @@ tags: $:/tags/Macro
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$list>
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$link>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$"""/>
|
||||
@ -126,17 +124,13 @@ tags: $:/tags/Macro
|
||||
<$reveal type="nomatch" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="open" class="tc-btn-invisible">
|
||||
{{$:/core/images/right-arrow}}
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
<$reveal type="match" state=<<toc-state>> text="open">
|
||||
<$button set=<<toc-state>> setTo="close" class="tc-btn-invisible">
|
||||
{{$:/core/images/down-arrow}}
|
||||
<$transclude field="caption">
|
||||
<$view field="title"/>
|
||||
</$transclude>
|
||||
<<toc-caption>>
|
||||
</$button>
|
||||
</$reveal>
|
||||
</$list>
|
||||
|
@ -46,6 +46,6 @@ Here is the tag structure shown with clickable tag pills:
|
||||
*{{Third||$:/core/ui/TagTemplate}}
|
||||
*{{Fourtth||$:/core/ui/TagTemplate}}
|
||||
|
||||
For instructions on adding a table of contents to the sidebar, see: {{How to add a new tab to the sidebar}}.
|
||||
For instructions on adding a table of contents to the sidebar, see: [[How to add a new tab to the sidebar]].
|
||||
|
||||
<<tabs "[tag[table-of-contents-example]]" "TableOfContentsMacro Simple Example">>
|
||||
|
12
plugins/tiddlywiki/tiddlyweb/GettingStarted Step 1.tid
Normal file
12
plugins/tiddlywiki/tiddlyweb/GettingStarted Step 1.tid
Normal file
@ -0,0 +1,12 @@
|
||||
title: GettingStarted (Step 1)
|
||||
tags: $:/tags/GettingStarted
|
||||
caption: Step 1<br>Syncing
|
||||
|
||||
! Syncing Changes to the Server
|
||||
|
||||
Before you can start storing important information in ~TiddlyWiki it is important to make sure that your changes are being reliably saved by the server.
|
||||
|
||||
# Create a new tiddler using the {{$:/core/images/new-button}} button in the sidebar on the right
|
||||
# Click the {{$:/core/images/done-button}} button at the top right of the new tiddler
|
||||
# Check the ~TiddlyWiki command line for a message confirming the tiddler has been saved
|
||||
# Refresh the page in the browser to and verify that the new tiddler has been correctly saved
|
Loading…
Reference in New Issue
Block a user