From b251a2bfa15373af9c965eb17e9ed7ccc1b022ca Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 28 Dec 2012 22:57:35 +0000 Subject: [PATCH] Docs updates --- .../tw5.com/tiddlers/Acknowledgements.tid | 2 +- editions/tw5.com/tiddlers/AllTiddlers.tid | 2 +- editions/tw5.com/tiddlers/HelloThere.tid | 7 +- editions/tw5.com/tiddlers/ReadMe.tid | 8 +- editions/tw5.com/tiddlers/TextReference.tid | 4 +- .../tiddlers/TiddlyWikiArchitecture.tid | 2 +- .../tiddlers/concepts/ContextTiddler.tid | 2 +- .../tiddlers/concepts/ShadowTiddlers.tid | 2 +- .../tiddlers/concepts/TiddlerFilters.tid | 8 +- editions/tw5.com/tiddlers/concepts/Wiki.tid | 8 +- .../tw5.com/tiddlers/concepts/WikiText.tid | 218 ++++++++++-------- .../tw5.com/tiddlers/macros/ImageMacro.tid | 26 --- .../tw5.com/tiddlers/macros/SliderMacro.tid | 22 -- .../tw5.com/tiddlers/macros/VideoMacro.tid | 10 - .../tw5.com/tiddlers/widgets/VideoWidget.tid | 10 + .../tiddlers/wikitextrules/ImageWikiText.tid | 45 ---- editions/tw5.com/wiki/DefaultTiddlers.tid | 2 +- readme.md | 10 +- 18 files changed, 155 insertions(+), 233 deletions(-) delete mode 100644 editions/tw5.com/tiddlers/macros/ImageMacro.tid delete mode 100644 editions/tw5.com/tiddlers/macros/SliderMacro.tid delete mode 100644 editions/tw5.com/tiddlers/macros/VideoMacro.tid create mode 100644 editions/tw5.com/tiddlers/widgets/VideoWidget.tid delete mode 100644 editions/tw5.com/tiddlers/wikitextrules/ImageWikiText.tid diff --git a/editions/tw5.com/tiddlers/Acknowledgements.tid b/editions/tw5.com/tiddlers/Acknowledgements.tid index c0130c3fd..29d70d9cc 100644 --- a/editions/tw5.com/tiddlers/Acknowledgements.tid +++ b/editions/tw5.com/tiddlers/Acknowledgements.tid @@ -8,4 +8,4 @@ TiddlyWiki5 stands on the shoulders of giants, by reusing these projects: * [[Twitter Bootstrap|http://twitter.github.com/bootstrap/]]'s CSS * [[LESS dynamic stylesheet language|http://lesscss.org/]], used by Bootstrap -* [[Esprima|http://esprima.org]], a JavaScript parsing infrastructure for multipurpose analysis +* [[The Stanford Javascript Crypto Library|http://crypto.stanford.edu/sjcl/]] diff --git a/editions/tw5.com/tiddlers/AllTiddlers.tid b/editions/tw5.com/tiddlers/AllTiddlers.tid index 8cf670f71..967a43b5a 100644 --- a/editions/tw5.com/tiddlers/AllTiddlers.tid +++ b/editions/tw5.com/tiddlers/AllTiddlers.tid @@ -3,4 +3,4 @@ tags: navigation Current tiddlers: -<> +<_list type="all" /> diff --git a/editions/tw5.com/tiddlers/HelloThere.tid b/editions/tw5.com/tiddlers/HelloThere.tid index 1bf2bde49..6973676c1 100644 --- a/editions/tw5.com/tiddlers/HelloThere.tid +++ b/editions/tw5.com/tiddlers/HelloThere.tid @@ -6,7 +6,7 @@ modified: 201208121934 Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the reusable non-linear personal web notebook [[first released in 2004|History]]. It is a complete interactive wiki in JavaScript that can be run from a single HTML file in the browser or as a powerful [[node.js application|node.js]]. -TiddlyWiki is designed to fit around your brain, giving you a better way of managing information compared to traditional documents and emails. The fundamental idea is that information is more useful and reusable if we cut it up into the smallest semantically meaningful chunks -- [[tiddlers|Tiddlers]] -- and give them titles so that they can be structured with links, tags and macros. TiddlyWiki aims to provide a fluid interface for working with tiddlers, allowing them to be aggregated and composed into longer narratives. +TiddlyWiki is designed to fit around your brain, giving you a better way of managing information than traditional documents and emails. The fundamental idea is that information is more useful and reusable if we cut it up into the smallest semantically meaningful chunks -- [[tiddlers|Tiddlers]] -- and give them titles so that they can be structured with links, tags and macros. TiddlyWiki aims to provide a fluid interface for working with tiddlers, allowing them to be aggregated and composed into longer narratives. //''28th December 2012'' - the TiddlyWiki5 core code is in the midst of some major refactoring upheavals, and there have been several regressions that will be fixed over the next few days, along with bringing the documentation back up to date// @@ -16,8 +16,3 @@ TiddlyWiki5 has many [[improvements|Improvements]] over the original. It is curr * Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]] * Join the discussions on [[the TiddlyWikiDev Google Group|http://groups.google.com/group/TiddlyWikiDev]] * Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news - -<< -<> - ->> diff --git a/editions/tw5.com/tiddlers/ReadMe.tid b/editions/tw5.com/tiddlers/ReadMe.tid index 9a6a04a43..fe55b8fd0 100644 --- a/editions/tw5.com/tiddlers/ReadMe.tid +++ b/editions/tw5.com/tiddlers/ReadMe.tid @@ -3,18 +3,18 @@ tags: introduction ! Welcome to TiddlyWiki5 -<> +{{HelloThere}} ! Usage -<> +{{CommandLineInterface}} ! Architecture -<> +{{TiddlyWikiArchitecture}} ! Boot Mechanism -<> +{{BootMechanism}} //This `readme` file was automatically generated by TiddlyWiki5// diff --git a/editions/tw5.com/tiddlers/TextReference.tid b/editions/tw5.com/tiddlers/TextReference.tid index 357b63640..6c973959d 100644 --- a/editions/tw5.com/tiddlers/TextReference.tid +++ b/editions/tw5.com/tiddlers/TextReference.tid @@ -5,8 +5,6 @@ A TextReference identifies a chunk of text from a tiddler that can be retrieved TextReferences are made up of several parts, most of which can be optional: +* `` - the text field of the specified tiddler * `!!` - a tiddler metadata field (eg, `modified`, `modifier`, `type` etc) -* `##` - a data field within a tiddler * `!!` - a metadata field of the current tiddler -* `##` - a datafield of the current tiddler - diff --git a/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid b/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid index 852a35e60..205aa77c1 100644 --- a/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid +++ b/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid @@ -6,7 +6,7 @@ tags: docs internals The heart of TiddlyWiki can be seen as an extensible representation transformation engine. Given the text of a tiddler and its associated ContentType, the engine can produce a rendering of the tiddler in a new ContentType. Furthermore, it can efficiently selectively update the rendering to track any changes in the tiddler or its dependents. -The most important transformations are from `text/vnd.tiddlywiki` wikitext into `text/html` or `text/plain` but the engine is used throughout the system for other transformations, such as converting images for display in HTML, sanitising fragments of JavaScript, and processing CSS. +The most important transformations are from `text/vnd.tiddlywiki` wikitext into `text/html` or `text/plain` but the engine is used throughout the system for other transformations. You can explore this mechanism by opening the JavaScript console in your browser. Typing this command will replace the text of the tiddler `HelloThere` with new content: diff --git a/editions/tw5.com/tiddlers/concepts/ContextTiddler.tid b/editions/tw5.com/tiddlers/concepts/ContextTiddler.tid index bdd3bea3b..69a12a8e6 100644 --- a/editions/tw5.com/tiddlers/concepts/ContextTiddler.tid +++ b/editions/tw5.com/tiddlers/concepts/ContextTiddler.tid @@ -1,4 +1,4 @@ title: ContextTiddler tags: docs concepts -The ContextTiddler is the current tiddler during WikiText processing. It allows you to write a macro like `<>` without explicitly specifying the tiddler that it applies to. +The ContextTiddler is the current tiddler during WikiText processing. It allows you to write a widget like `<_view field="title" format="link"/>` in TiddlerTemplates without explicitly specifying the tiddler that it applies to. diff --git a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid index ca64da733..08c1b8465 100644 --- a/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid +++ b/editions/tw5.com/tiddlers/concepts/ShadowTiddlers.tid @@ -7,4 +7,4 @@ Thus, even an apparently empty TiddlyWiki actually contains dozens of tiddlers t The current shadow tiddlers are: -<> +<_list type="shadows" /> diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid b/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid index 0a0b89691..3175c87a4 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerFilters.tid @@ -7,7 +7,7 @@ Filters are used in TiddlyWiki to choose tiddlers by specifying simple match cri The mechanism is easiest to understand by first presenting some example filter strings: -{{table-condensed{ +@@.table-condensed |!Filter |!Results | |`HelloThere` |The single tiddler titled `HelloThere` (if it exists) | |`[[A Title With Several Words]]` |The single tiddler titled `A Title With Several Words` (if it exists) | @@ -23,7 +23,7 @@ The mechanism is easiest to understand by first presenting some example filter s |`[[MyTiddler]tags[]]` |All tiddlers being used as tags on the tiddler `MyTiddler` | |`[[MyTiddler]tagging[]]` |All tiddlers being tagged with `MyTiddler` | |`[list[MyList]]` |All tiddlers listed in `MyList` | -}}} +@@ ! Operators @@ -55,9 +55,9 @@ The operands available with the `is` operator are: Operators are combined into runs that function as logically ANDed expressions by bashing them together and merging the square brackets: -{{{ +``` [tag[one]] [tag[two]] ---> [tag[one]tag[two]] -}}} +``` Runs can be preceded with `-` to negate their action, removing the selected tiddlers from the results. For example, `[tag[Tommy]] -HelloThere -[[Another One]]` selects all tiddlers tagged with `Tommy` except those titled `HelloThere` or `Another One`. diff --git a/editions/tw5.com/tiddlers/concepts/Wiki.tid b/editions/tw5.com/tiddlers/concepts/Wiki.tid index 2d71cd31d..126a2f460 100644 --- a/editions/tw5.com/tiddlers/concepts/Wiki.tid +++ b/editions/tw5.com/tiddlers/concepts/Wiki.tid @@ -3,10 +3,4 @@ tags: docs concepts Groups of uniquely titled tiddlers are contained in WikiStore objects. -The WikiStore also manages the plugin modules used for macros, and operations like serializing, deserializing, parsing and rendering tiddlers. - -!! ~WikiStore Events - -Clients can register event handlers with the WikiStore object. Event handlers can be registered to be triggered for modifications to any tiddler in the store, or with a filter to only be invoked when a particular tiddler or set of tiddlers changes. - -Whenever a change is made to a tiddler, the wikistore registers a `nexttick` handler (if it hasn't already done so). The `nexttick` handler looks back at all the tiddler changes, and dispatches any matching event handlers. \ No newline at end of file +The WikiStore also manages the plugin modules used for widgets, and operations like serializing, deserializing, parsing and rendering tiddlers. diff --git a/editions/tw5.com/tiddlers/concepts/WikiText.tid b/editions/tw5.com/tiddlers/concepts/WikiText.tid index 98b30b1fd..e1bb22c01 100644 --- a/editions/tw5.com/tiddlers/concepts/WikiText.tid +++ b/editions/tw5.com/tiddlers/concepts/WikiText.tid @@ -9,16 +9,16 @@ WikiText is a concise, expressive way of typing a wide range of text formatting, 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: `[[Tiddler Title|Displayed Link 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: -{{{ +``` * ~HelloThere is not a link * ~http://google.com/ is not a link -}}} +``` Renders as: @@ -29,22 +29,20 @@ Renders as: 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: -{{{ +``` This is a paragraph made up of short lines - - -}}} +``` Renders as: @@ -57,43 +55,72 @@ short lines Available character formatting includes: -* {{{`backticks`}}} for `code` +* `backticks` 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 +* `,,subscript,,` for ,,subscripted,, text +* `~~strikethrough~~` for ~~strikethrough~~ text -You can also use `{{{` to mark code blocks: +You can also use triple backticks ``` to mark code blocks: -{{{ - {{{ - This will be monospaced - }}} -}}} +
+```
+This will be monospaced
+```
+
+ +Renders as: + +``` +This will be monospaced +``` ! Transclusion You can incorporate the content of one tiddler within another using the transclusion notation: -* `{{JeremyRuston}}` transcludes a single tiddler +* `{{MyTiddler}}` transcludes a single tiddler +* `{{MyTiddler|tooltip}}` adds a tooltip +* `{{MyTiddler||TemplateTitle}}` displays the tiddler through a specified [[TiddlerTemplate|TiddlerTemplates]] +* `{{MyTiddler|tooltip||TemplateTitle}}` specifies both a tooltip and a template for the transcluded content +* `{{MyTiddler}width:40;height:50;}.firstClass.secondClass` transcludes a single tiddler, adding the specified styles and classes to the transcluded content -A template can also be specified, in which case the tiddler(s) are rendered through that [[TiddlerTemplate|TiddlerTemplates]]. Templates can either be specified directly or instead a tiddler can be specified from which the template is extracted. +A similar syntax can be used to transclude a list of tiddlers matching a specified [[TiddlerFilter|TiddlerFilters]]: -* `{{MyTiddler} <> by <>}` renders the tiddler `MyTiddler` through a template that will yield `MyTiddler by JeremyRuston`, if the `modified` field is set to "JeremyRuston" -* `{{MyTiddler}{MyTemplate}}` renders the tiddler `MyTiddler` through the template `MyTemplate` +``` +{{{ [tag[docs]] }}} +{{{ [tag[docs]] |tooltip}}} +{{{ [tag[docs]] ||TemplateTitle}}} +{{{ [tag[docs]] |tooltip||TemplateTitle}}} +{{{ [tag[docs]] }}width:40;height:50;}.class.class +``` + +! Images + +To display an image stored in a tiddler just transclude that tiddler + +``` +{{Motovun Jack.jpg}} +``` + +Displays as: + +{{Motovun Jack.jpg}} + +See ImageWikiText for more details. ! Lists You can create unordered lists with `*` characters: -{{{ +``` * First list item * Second list item ** A subitem * Third list item -}}} +``` Renders as: @@ -110,14 +137,14 @@ Ordered lists use `#` instead of `*`: You can also mix ordered and unordered list items: -{{{ +``` * To do today *# Eat * To get someone else to do *# This *# That *## And the other -}}} +``` Renders as: @@ -130,12 +157,12 @@ Renders as: You can also create HTML definition lists: -{{{ +``` ; Term being defined : Definition of that term ; Another term : Another definition -}}} +``` Renders as: @@ -144,49 +171,70 @@ Renders as: ; Another term : Another definition -! Cascading Stylesheets +! Adding styles and classes -You can use this construction to cause the wrapped content to be assigned a specified CSS class: +You can use this construction to cause the wrapped content to be assigned specified CSS classes or styles: -{{{ - {{myStyle{ - * List One - * List Two - }}} -}}} +``` +@@.myStyle +* List One +* List Two +@@ +``` The resulting HTML looks like this: -{{{ +```
  • List One
  • List Two
-}}} +``` -You can also assign a CSS class to an individual member of a list with this notation: +Similar syntax is used to assign styles. For example: -{{{ +``` +@@background-color:red; * List One -*.MyClass List Two -* List Three -}}} +* List Two +@@ +``` The resulting HTML looks like this: -{{{ +``` +
    +
  • List One
  • +
  • List Two
  • +
+``` + +Multiple styles and classes can be mixed. For example: + +``` +@@.aClass +@@width:400px; +Some text +@@ +``` + +You can also assign a CSS class to an individual member of a list with this notation: + +``` +* List One +*.MyClass List Two +* List Three +``` + +The resulting HTML looks like this: + +```
  • List One
  • List Two
  • List Three
-}}} - -The same syntax can be used with headings: - -{{{ -!.myStyle This heading has the class `myStyle` -}}} +``` ! Typographic Features @@ -194,60 +242,52 @@ You can create an n-dash with a double hyphen `--` and an m-dash with a triple h You can include a horizontal rule with three or more dashes on their own on a line: -{{{ +``` --- -}}} +``` Renders as: --- -! Images - -To display an image stored in a tiddler: - -{{{ -[img[Motovun Jack.jpg]] -}}} - -Displays as: - -[img[Motovun Jack.jpg]] - -See ImageWikiText for more details. - ! HTML in WikiText HTML tags and comments can be used directly in WikiText. For example: -{{{ +```
This is my nice and simple block of text. HelloThere
-}}} +``` -! Macros +! Widgets -Macros provide rich functionality within WikiText. For example, the `<