1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Big docs update

Finally sorting out the wikitext documentation
This commit is contained in:
Jermolene 2013-12-05 16:21:10 +00:00
parent d64c37c3b7
commit 1fddcf075f
27 changed files with 370 additions and 370 deletions

View File

@ -13,5 +13,21 @@ title: $:/core/ui/PageMacros
</$reveal>
</$list>
</div>
\end
\define wikitext-example(src)
```
$src$
```
Renders as:
$src$
In HTML:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
\end
{{$:/core/ui/PageTemplate}}

View File

@ -41,7 +41,7 @@ The machinery tying those concepts together includes:
These are the individual rules that make up WikiText:
<$list filter="[tag[wikitextrule]sort[title]]" type="ul"/>
<$list filter="[tag[wikitext]sort[title]]" type="ul"/>
! Widgets

View File

@ -1,6 +1,6 @@
created: 20131201132300007
creator: JeremyRuston
modified: 20131202102409399
modified: 20131205152854723
modifier: JeremyRuston
tags: releasenote
title: Release 5.0.1-alpha
@ -14,6 +14,8 @@ type: text/vnd.tiddlywiki
** Ignores attempts to import plugins that are older than currently installed plugins
** System tiddlers are now imported as usual
* If `$:/theme` isn't defined or refers to a missing tiddler, then fallback through ''Snow White'' to ''Vanilla''. This means that `empty.html` now defaults to ''Snow White''
* Added support for blockquotes by extending the list parser
** Contributed by StephanHradek (@Skeeve on GitHub)
!! Bug fixes

View File

@ -1,19 +0,0 @@
created: 20130825213500000
creator: JeremyRuston
modified: 20131202202932619
modifier: JeremyRuston
tags: definitions
title: TiddlySpot
type: text/vnd.tiddlywiki
TiddlySpot is a free hosting service for TiddlyWiki documents from Simon and Daniel Baird. It has been in operation almost as long as TiddlyWiki itself.
TiddlyWiki5 isn't yet built in to TiddlySpot but you can use it by following these steps:
# Sign up for a new wiki at http://tiddlyspot.com/, and remember the wiki name and password
# Open TiddlyWiki5 in your browser from http://five.tiddlywiki.com/empty.html
# Fill in the TiddlySpot wikiname and password in the control panel
# Click the "Save Changes" button. You should get a confirmation notification at the top right saying ''Saved wiki''. Saving can take several seconds if you're on a slow connection or working with a large wiki.
#* //This step won't work in Firefox thanks to its default security policy. Google Chrome works fine//
# Navigate to your TiddlySpot URL at http://{wikiname}.tiddlyspot.com/
# You should see a copy of TiddlyWiki5. You can edit and create tiddlers, and click "Save Changes" to save changes back up to TiddlySpot (you'll need to re-enter your password the first time you visit the wiki on TiddlySpot)

View File

@ -1,287 +1,11 @@
created: 20131205155227468
creator: JeremyRuston
modified: 20131205161350589
modifier: JeremyRuston
tags: concepts
type: text/vnd.tiddlywiki
title: WikiText
modified: 201310291329
\define wikitext-example(src)
```
$src$
```
Renders as:
$src$
In HTML:
$$$text/vnd.tiddlywiki>text/html
$src$
$$$
\end
type: text/vnd.tiddlywiki
WikiText is a concise, expressive way of typing a wide range of text formatting, hypertext and interactive features. It allows you to focus on writing without a complex user interface getting in the way. It is designed to be familiar for users of [[MarkDown|http://daringfireball.net/projects/markdown/]], but with more of a focus on linking and the interactive features.
! Linking in WikiText
A key capability of WikiText is the ability to make links to other tiddlers or to external websites. There are several ways of doing this:
* To link to a tiddler by title: `[[Tiddler Title]]`
* To link to a tiddler and specify the text of the link: `[[Displayed Link Title|Tiddler Title]]`
* For tiddler titles that match the CamelCase rules, just typing the title will automatically create a link
* To link to an external website, type the full URL of the site: `http://five.tiddlywiki.com/`
You can suppress a link from being recognised by preceding it with `~`. For example:
<<wikitext-example src:"* ~HelloThere is not a link
* ~http://google.com/ is not a link">>
! Paragraphs
To mark the end of a paragraph in TiddlyWiki you need to type `enter` twice to create a double line break:
```
This is the first paragraph.
And this is the second paragraph.
```
Single line breaks are ignored within paragraphs. For example:
<<wikitext-example src:"This is a
paragraph made
up of
short lines">>
! Formatting
Available character formatting includes:
* <code>&#96;backticks&#96;</code> for `code`
* `''bold''` for ''bold text''
* `//italic//` for //italic text//
* `__underscore__` for __underscored text__
* `^^superscript^^` for ^^superscript^^ text
* `,,subscript,,` for ,,subscripted,, text
* `~~strikethrough~~` for ~~strikethrough~~ text
You can also use triple backticks <code>&#96;&#96;&#96;</code> to mark code blocks:
<pre>
&#96;&#96;&#96;
This will be monospaced
&#96;&#96;&#96;
</pre>
The three backticks need to be at the start of the line and immediately followed by a newline, otherwise they won't be interpreted correctly.
Renders as:
```
This will be monospaced
```
! Transclusion
You can incorporate the content of one tiddler within another using the transclusion notation:
* `{{MyTiddler}}` transcludes a single tiddler
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]]
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
```
{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}
```
! Images
To display an image stored in a tiddler just transclude that tiddler:
```
{{Motovun Jack.jpg}}
```
Renders as:
{{Motovun Jack.jpg}}
! Lists
You can create unordered lists with `*` characters:
<<wikitext-example src:"* First list item
* Second list item
** A subitem
* Third list item
">>
Ordered lists use `#` instead of `*`:
# First item
# Second item
# Third item
You can also mix ordered and unordered list items:
<<wikitext-example src:"* To do today
*# Eat
* To get someone else to do
*# This
*# That
*## And the other
">>
You can also create HTML definition lists:
<<wikitext-example src:"; Term being defined
: Definition of that term
; Another term
: Another definition
">>
! Adding styles and classes
You can use this construction to cause the wrapped content to be assigned specified CSS classes or styles:
<<wikitext-example src:"@@.myStyle
* List One
* List Two
@@
">>
Similar syntax is used to assign styles. For example:
<<wikitext-example src:"@@background-color:red;
* List One
* List Two
@@
">>
Multiple styles and classes can be mixed. For example:
<<wikitext-example src:"@@.tw-tiddler-frame
@@width:400px;
Some text
@@
">>
You can also assign a CSS class to an individual member of a list with this notation:
<<wikitext-example src:"* List One
*.MyClass List Two
* List Three
">>
! Typographic Features
You can create an n-dash with a double hyphen `--` and an m-dash with a triple hyphen `---`. For example -- this is an example --- and so is this
You can include a horizontal rule with three or more dashes on their own on a line:
<<wikitext-example src:"
---
">>
! Macros
Macros are snippets of text that can be inserted with a concise shortcut. A macro is defined like this:
```
\define mysamplemacro(name:"Bugs Bunny",address:"Rabbit Hole Hill")
Hi, I'm $name$ and I live in $address$
\end
```
The first line of the definition specifies the macro name and any parameters. Parameters are named and can optionally have default values that are used if the parameter isn't specified at the time of calling. The body of the macro definition follows, terminated with `\end`. The macro can include parameters using the `$name$` construction.
Macro definitions must be placed at the top of a tiddler. Macros are available to the tiddler that defines them, plus any tiddlers that it transcludes.
Macros are used like this:
```
<<mysamplemacro>>
<<mysamplemacro "Donald Duck">>
<<mysamplemacro "Mickey Mouse" "Mouse House">>
```
Resulting in:
```
Hi I'm Bugs Bunny and I live in Rabbit Hole Hill
Hi I'm Donald Duck and I live in Rabbit Hole Hill
Hi I'm Mickey Mouse and I live in Mouse House
```
! HTML in WikiText
HTML tags and comments can be used directly in WikiText. For example:
```
<article class="hello">
This is my nice and simple block of text. HelloThere
<!-- This comment will not appear in the wikified output -->
</article>
```
Attributes in HTML tags can be specified as a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
```
<a href={{MyLinkDestination}}>link</a>
```
Here an attribute is specified as a macro invocation:
```
<a href=<<MyMacro "Brian">>>link</a>
```
! Widgets
Widgets provide rich functionality within WikiText. For example, the `<$video>` widget can be used to embed videos from YouTube, Vimeo or the Internet Archive:
```
<$video src="32001208" type="vimeo" />
```
For full details of the available widgets, see the [[Docs]].
! Headings
Headings are specified with one or more leading `!` characters:
```
! This is a level 1 heading
!! This is a level 2 heading
!!! This is a level 3 heading
```
CSS classes can be assigned to individual headings like this:
```
!.myStyle This heading has the class `myStyle`
```
! Other WikiText features
!! Typed Blocks
You can incorporate text of a different type within blocks of WikiText. For example:
```
$$$.js
return 2 + "string";
$$$
```
Renders as:
$$$.js
return 2 + "string";
$$$
See TypedBlockWikiText for more details
<$list filter="[tag[wikitext]sort[title]]"/>

View File

@ -1,6 +1,6 @@
created: 20131129092753119
creator: JeremyRuston
modified: 20131130073126246
modified: 20131205151815248
modifier: JeremyRuston
tags: howto
title: Saving with TiddlyFox
@ -11,8 +11,8 @@ type: text/vnd.tiddlywiki
#* https://addons.mozilla.org/en-US/firefox/addon/tiddlyfox/
# Restart [[Firefox]]
# [[Download]] an empty TiddlyWiki by clicking this button:
#* {{$:/editions/tw5.com/snippets/download-empty-button}}
#* Your browser may ask you to accept the download before it begins
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
#> Your browser may ask you to accept the download before it begins
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` extension
# Open the file in [[Firefox]]

View File

@ -1,6 +1,6 @@
created: 20131129092604900
creator: JeremyRuston
modified: 20131130073142081
modified: 20131205151828564
modifier: JeremyRuston
tags: howto
title: Saving with the HTML5 fallback saver
@ -9,8 +9,8 @@ type: text/vnd.tiddlywiki
This method of saving changes is clunky but has the advantage of working on almost all desktop browsers, and many mobile browsers.
# [[Download]] an empty TiddlyWiki by clicking this button:
#* {{$:/editions/tw5.com/snippets/download-empty-button}}
#* Your browser may ask you to accept the download before it begins
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
#> Your browser may ask you to accept the download before it begins
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` extension
# Open the file in your browser

View File

@ -0,0 +1,23 @@
created: 20131205160047557
creator: JeremyRuston
modified: 20131205160108132
modifier: JeremyRuston
tags: wikitext
title: Code Blocks in WikiText
type: text/vnd.tiddlywiki
You can use triple backticks <code>&#96;&#96;&#96;</code> to mark code blocks:
<pre>
&#96;&#96;&#96;
This will be monospaced
&#96;&#96;&#96;
</pre>
The three backticks need to be at the start of the line and immediately followed by a newline, otherwise they won't be interpreted correctly.
Renders as:
```
This will be monospaced
```

View File

@ -0,0 +1,9 @@
created: 20131205160641986
creator: JeremyRuston
modified: 20131205160653909
modifier: JeremyRuston
tags: wikitext
title: Dashes in WikiText
type: text/vnd.tiddlywiki
You can create an n-dash with a double hyphen `--` and an m-dash with a triple hyphen `---`. For example -- this is an example --- and so is this

View File

@ -0,0 +1,15 @@
created: 20131205160424246
creator: JeremyRuston
modified: 20131205160450910
modifier: JeremyRuston
tags: wikitext
title: Definitions in WikiText
type: text/vnd.tiddlywiki
HTML definition lists are created with this syntax:
<<wikitext-example src:"; Term being defined
: Definition of that term
; Another term
: Another definition
">>

View File

@ -0,0 +1,19 @@
created: 20131205155959399
creator: JeremyRuston
modified: 20131205160130832
modifier: JeremyRuston
tags: wikitext
title: Formatting in WikiText
type: text/vnd.tiddlywiki
Available character formatting includes:
* <code>&#96;backticks&#96;</code> for `code`
* `''bold''` for ''bold text''
* `//italic//` for //italic text//
* `__underscore__` for __underscored text__
* `^^superscript^^` for ^^superscript^^ text
* `,,subscript,,` for ,,subscripted,, text
* `~~strikethrough~~` for ~~strikethrough~~ text
See also: [[Code Blocks in WikiText]]

View File

@ -0,0 +1,28 @@
created: 20131205160816081
creator: JeremyRuston
modified: 20131205160828313
modifier: JeremyRuston
tags: wikitext
title: HTML in WikiText
type: text/vnd.tiddlywiki
HTML tags and comments can be used directly in WikiText. For example:
```
<article class="hello">
This is my nice and simple block of text. HelloThere
<!-- This comment will not appear in the wikified output -->
</article>
```
Attributes in HTML tags can be specified as a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
```
<a href={{MyLinkDestination}}>link</a>
```
Here an attribute is specified as a macro invocation:
```
<a href=<<MyMacro "Brian">>>link</a>
```

View File

@ -0,0 +1,23 @@
created: 20131205161234909
creator: JeremyRuston
modified: 20131205161256525
modifier: JeremyRuston
tags: wikitext
title: Headings in WikiText
type: text/vnd.tiddlywiki
Headings are specified with one or more leading `!` characters:
```
! This is a level 1 heading
!! This is a level 2 heading
!!! This is a level 3 heading
```
CSS classes can be assigned to individual headings like this:
```
!.myStyle This heading has the class `myStyle`
```

View File

@ -0,0 +1,13 @@
created: 20131205160706975
creator: JeremyRuston
modified: 20131205160719633
modifier: JeremyRuston
tags: wikitext
title: Horizontal Rules in WikiText
type: text/vnd.tiddlywiki
You can include a horizontal rule with three or more dashes on their own on a line:
<<wikitext-example src:"
---
">>

View File

@ -0,0 +1,17 @@
created: 20131205160221762
creator: JeremyRuston
modified: 20131205160234142
modifier: JeremyRuston
tags: wikitext
title: Images in WikiText
type: text/vnd.tiddlywiki
To display an image stored in a tiddler just transclude that tiddler:
```
{{Motovun Jack.jpg}}
```
Renders as:
{{Motovun Jack.jpg}}

View File

@ -0,0 +1,19 @@
created: 20131205155230596
creator: JeremyRuston
modified: 20131205155813974
modifier: JeremyRuston
tags: wikitext
title: Linking in WikiText
type: text/vnd.tiddlywiki
A key capability of WikiText is the ability to make links to other tiddlers or to external websites. There are several ways of doing this:
* To link to a tiddler by title: `[[Tiddler Title]]`
* To link to a tiddler and specify the text of the link: `[[Displayed Link Title|Tiddler Title]]`
* For tiddler titles that match the CamelCase rules, just typing the title will automatically create a link
* To link to an external website, type the full URL of the site: `http://five.tiddlywiki.com/` or `[[TW5|http://five.tiddlywiki.com/]]`
You can suppress a link from being recognised by preceding it with `~`. For example:
<<wikitext-example src:"* ~HelloThere is not a link
* ~http://google.com/ is not a link">>

View File

@ -0,0 +1,40 @@
created: 20131205160257619
creator: JeremyRuston
modified: 20131205160620014
modifier: JeremyRuston
tags: wikitext
title: Lists in WikiText
type: text/vnd.tiddlywiki
You can create unordered lists with `*` characters:
<<wikitext-example src:"* First list item
* Second list item
** A subitem
* Third list item
">>
Ordered lists use `#` instead of `*`:
# First item
# Second item
# Third item
You can also mix ordered and unordered list items:
<<wikitext-example src:"* To do today
*# Eat
* To get someone else to do
*# This
*# That
*## And the other
">>
You can also assign a CSS class to an individual member of a list with this notation:
<<wikitext-example src:"* List One
*.MyClass List Two
* List Three
">>
Note that [[Block Quotes in WikiText]] can be mixed with lists.

View File

@ -0,0 +1,36 @@
created: 20131205160746466
creator: JeremyRuston
modified: 20131205160758948
modifier: JeremyRuston
tags: wikitext
title: Macros in WikiText
type: text/vnd.tiddlywiki
Macros are snippets of text that can be inserted with a concise shortcut. A macro is defined like this:
```
\define mysamplemacro(name:"Bugs Bunny",address:"Rabbit Hole Hill")
Hi, I'm $name$ and I live in $address$
\end
```
The first line of the definition specifies the macro name and any parameters. Parameters are named and can optionally have default values that are used if the parameter isn't specified at the time of calling. The body of the macro definition follows, terminated with `\end`. The macro can include parameters using the `$name$` construction.
Macro definitions must be placed at the top of a tiddler. Macros are available to the tiddler that defines them, plus any tiddlers that it transcludes.
Macros are used like this:
```
<<mysamplemacro>>
<<mysamplemacro "Donald Duck">>
<<mysamplemacro "Mickey Mouse" "Mouse House">>
```
Resulting in:
```
Hi I'm Bugs Bunny and I live in Rabbit Hole Hill
Hi I'm Donald Duck and I live in Rabbit Hole Hill
Hi I'm Mickey Mouse and I live in Mouse House
```

View File

@ -0,0 +1,22 @@
created: 20131205155836435
creator: JeremyRuston
modified: 20131205155853526
modifier: JeremyRuston
tags: wikitext
title: Paragraphs in WikiText
type: text/vnd.tiddlywiki
To mark the end of a paragraph in TiddlyWiki you need to type `enter` twice to create a double line break:
```
This is the first paragraph.
And this is the second paragraph.
```
Single line breaks are ignored within paragraphs. For example:
<<wikitext-example src:"This is a
paragraph made
up of
short lines">>

View File

@ -0,0 +1,31 @@
created: 20131205160532119
creator: JeremyRuston
modified: 20131205160549129
modifier: JeremyRuston
tags: wikitext
title: Styles and Classes in WikiText
type: text/vnd.tiddlywiki
You can use this construction to cause the wrapped content to be assigned specified CSS classes or styles:
<<wikitext-example src:"@@.myStyle
* List One
* List Two
@@
">>
Similar syntax is used to assign styles. For example:
<<wikitext-example src:"@@background-color:red;
* List One
* List Two
@@
">>
Multiple styles and classes can be mixed. For example:
<<wikitext-example src:"@@.tw-tiddler-frame
@@width:400px;
Some text
@@
">>

View File

@ -1,9 +1,10 @@
created: 201309141321
created: 20130914132100000
creator: JeremyRuston
modified: 201309141355
modified: 20131205161224607
modifier: JeremyRuston
tags: wikitextrule
title: TableWikiText
tags: wikitext
title: Tables in WikiText
type: text/vnd.tiddlywiki
! Basics

View File

@ -0,0 +1,19 @@
created: 20131205160146648
creator: JeremyRuston
modified: 20131205160204570
modifier: JeremyRuston
tags: wikitext
title: Transclusion in WikiText
type: text/vnd.tiddlywiki
You can incorporate the content of one tiddler within another using the transclusion notation:
* `{{MyTiddler}}` transcludes a single tiddler
* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]]
A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]:
```
{{{ [tag[mechanism]] }}}
{{{ [tag[mechanism]] ||TemplateTitle}}}
```

View File

@ -1,5 +1,10 @@
title: TypedBlockWikiText
tags: wikitextrule
created: 20131205161051792
creator: JeremyRuston
modified: 20131205161130352
modifier: JeremyRuston
tags: wikitext
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
WikiText can include blocks of text that are rendered with an explicit ContentType like this:

View File

@ -0,0 +1,12 @@
created: 20131205160840915
creator: JeremyRuston
modified: 20131205161336125
modifier: JeremyRuston
tags: wikitext
title: Widgets in WikiText
type: text/vnd.tiddlywiki
Widgets provide rich functionality within WikiText.
<$list filter="[tag[widget]sort[title]]"/>

View File

@ -1,55 +0,0 @@
title: StyleBlockWikiText
tags: wikitextrule
This syntax enables you to assign arbitrary styles and classes to generated elements. For example:
```
@@color:#f00;
@@text-decoration:underline;
@@.myClass
This is in red!
@@
```
Generates the results:
@@color:#f00;
@@text-decoration:underline;
@@.myClass
This is in red!
@@
The HTML looks like this:
```
<p class="myClass" style="color:rgb(255, 0, 0); text-decoration:underline;">This is in red!</p>
```
Note that classes and styles can be mixed subject to the rule that styles must precede classes. For example
```
@@.myFirstClass.mySecondClass
@@width:100px;.myThirdClass
This is a paragraph
@@
```
Note that the style block doesn't generate any HTML elements itself, but instead causes the styles to be applied to all of the elements contained within the style block. This means that you can assign styles to elements generated from WikiText. For example, here is a list with some additional styles applied:
```
@@background-color:#00f;
* First item
* Second item
* Third item
@@
```
The generated HTML is:
```
<ul style="background-color: #00f;">
<li>First item</li>
<li>Second item</li>
<li>Third item</li></ul>
```