Compare commits

...

43 Commits

Author SHA1 Message Date
cmo-pomerium 73f3cb91c0
Merge ff1821cde9 into 1d48909012 2024-04-25 23:34:56 +08:00
Jeremy Ruston 1d48909012 Docs: Remove reference to restrictions on field names
Fixes #8146
2024-04-16 10:34:49 +01:00
Joshua Fontany d3722a6602
Docs for use-browser-cache (#8142)
* docs for use-browser-cache

* Update WebServer Parameter_ use-browse-cache.tid

remove timestamps

* revert last change

* move to webserver folder

* clarify, typos

* dedupe
2024-04-13 10:08:40 +01:00
andjar 1fb9098c76
Update cla-individual.md (#8133)
Signing the CLA
2024-04-09 22:22:18 +01:00
Crystal Person 804f227815
Signing CLA (#8126) 2024-03-31 17:08:09 +01:00
Mario Pietsch b595651fe1
Fix hide-show button code needs to be transcluded mode=block (#8082) 2024-03-28 21:50:22 +00:00
Mario Pietsch 9cd6affcae
Minor changes to Widgets tiddler (#8107) 2024-03-28 19:29:57 +00:00
Jeremy Ruston d37d6595b5 Docs: Add link to Basic Auth example 2024-03-27 10:09:46 +00:00
Jeremy Ruston e02cafb938 Add docs about using Basic Authentication in HTTP requests 2024-03-27 08:35:56 +00:00
poc2go 09f04cb5a6
Signing the CLA (#8077) 2024-03-16 17:33:13 +00:00
Mario Pietsch 511d480a60
Fix wikitext-macros example block mode (#8071) 2024-03-15 18:08:37 +00:00
Mario Pietsch 3342cfc886
Docs: fix doubled list in: Deprecated - What does it mean (#8060) 2024-03-13 22:08:11 +00:00
Mario Pietsch ec0b264426
Docs: add Procedures railroad syntax description (#8061) 2024-03-13 22:07:39 +00:00
Mario Pietsch 8f741e8e67
Docs: deprecate Macro call railroad syntax (#8062) 2024-03-13 22:06:23 +00:00
Mario Pietsch 32bf9fd7a1
Docs - wikitext-macros new v5.3.x syntaxWikitext macros (#8059)
* docs - wikitext-macros new v5.3.x syntax

* fix flexcard macro wrong link
2024-03-13 22:02:56 +00:00
Mateusz Wilczek 21a5841aab
Add links to and instructions about Saq's PR Maker in docs (#8068) 2024-03-13 12:17:14 +00:00
Mateusz Wilczek edfd27fa45
Improve filter run prefix docs (#8067) 2024-03-12 20:54:45 +00:00
Jeremy Ruston 0e7d566df7 Add link to demo of TiddlyWiki as a library in other Node.js apps 2024-03-12 17:16:51 +00:00
Mario Pietsch 8481b7d137
Dev edition: change layout to fluid-fixed (#8063) 2024-03-12 08:56:12 +00:00
Mario Pietsch 0fbfdce4b6
Add $:/StoryList to gitignore for tiddlywiki-com branch (#8065) 2024-03-12 08:54:09 +00:00
Jeremy Ruston e67eaca030 Revert "Docs - wikitext-macros new v5.3.x syntax (#8033)"
This reverts commit 0fb10da8b3.
2024-03-11 12:13:25 +00:00
Mario Pietsch 78a09fcf56
Docs - download empty button new syntax - v5.3.x (#8034)
* docs - download empty button new syntax - want to keep stuff like this for the time beeing

* use \procedure instead of \define for consistency
2024-03-10 15:07:56 +00:00
Mario Pietsch 0f395ce81d
Add code-body field to doc-styles tiddler (#8054) 2024-03-10 15:07:28 +00:00
Mario Pietsch b28f420430
Some more tv-macros changed to new syntax. Plus adjusted doc tiddlers (#8056) 2024-03-10 15:06:04 +00:00
Mario Pietsch 0b7914785c
Minor adjustments to existing doc tiddlers without changing modified date (#8057) 2024-03-10 15:05:26 +00:00
Mario Pietsch 8d36ecd6bc
Add list-links to $:/deprecated tag (#8053) 2024-03-10 14:30:21 +00:00
Mario Pietsch c2b436371b
Docs: tiddler-info-source - change sources tab to new syntax and add link to pr-creator (#8029)
* tiddler-info-source - change sources tab to new syntax and add link to pr-creator

* remove class from plain text elements as requested
2024-03-10 11:08:00 +00:00
Mario Pietsch 24e474bd72
Doc-macros, styles and documentation overview tiddler (#8037) 2024-03-10 10:41:09 +00:00
Mario Pietsch a75d4ca003
Docs - operator macros, templates and filter-run template (#8035) 2024-03-10 10:39:16 +00:00
Mario Pietsch 0fb10da8b3
Docs - wikitext-macros new v5.3.x syntax (#8033) 2024-03-10 10:37:26 +00:00
Mario Pietsch 0202d7b463
Docs - make .from-version and .deprecated-since macros more readable (#8032) 2024-03-10 10:36:49 +00:00
Mario Pietsch b22570a91f
Doc-macros - variable-macros new v5.3.x syntax (#8031)
* doc-macros - variable-macros new v5.3.x syntax

* change modified back to old value
2024-03-10 10:35:31 +00:00
Télumire 35d1609a2b
Add a warning for potential image map scaling issues + responsive alternative with SVG (#8044)
* Add a warning for potential image map scaling issues + alternative with SVG

* Update ImageWidget.tid

fix phrasing
2024-03-09 14:39:15 +00:00
Jeremy Ruston a90b1dbb49 Docs for bags and recipes
Prompted by https://talk.tiddlywiki.org/t/whats-a-bag-and-whats-a-tiddlywebadaptor/9278
2024-03-09 14:24:42 +00:00
Jeremy Ruston 72c4b92a4c Move some docs tiddlers to the correct directories 2024-03-09 14:23:45 +00:00
Mario Pietsch 9082f36008
Docs: Add example for sha256 operator (#8042) 2024-03-08 17:29:17 +00:00
lin onetwo 6f9cabd352
DevDocs: about modern frameworks in TiddlyWiki (#8027)
* docs: abount modern frameworks

(cherry picked from commit 783547bac2d1bfaa20def3eeda0dc10b6b465d8d)

* docs: modified time

(cherry picked from commit c8db907fe273a414768f5292f61986800e092dfe)
2024-03-06 17:35:42 +00:00
TonyM f02fafe365
Update RefreshThrottling.tid (#8024)
Change word "preciously" to "previously" as I believe was intend.
2024-03-02 20:03:59 +00:00
Mario Pietsch 4fba206606
move tip to the end of the tiddler so it does not distract reading (#8019)
* move tip to the end of the tiddler so it does not distract reading

* reset modified
2024-02-29 19:26:19 +00:00
Jeremy Ruston 5b2d35e8d1 Revert "Update backtranscludes.tid (#8010)"
This reverts commit 32de6eca22.
2024-02-28 18:04:16 +00:00
catter-fly 4ae6f1ffd4
Adjusting saving w/r/t FireFox (#7669) 2024-02-28 11:38:00 +00:00
cmo-pomerium ff1821cde9
Update editions/tw5.com/tiddlers/webserver/WebServer Header Authentication.tid 2023-08-08 08:38:16 -07:00
cmo-pomerium 8ddcf72919
If applied, this commit will give users a link to an open-source guide 2023-08-03 14:02:39 -07:00
62 changed files with 1083 additions and 585 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
$__StoryList.tid

View File

@ -16,6 +16,7 @@ Welcome to the developer documentation for TiddlyWiki (https://tiddlywiki.com/).
** [[Adding Babel Polyfill to TiddlyWiki]]
** [[TiddlyWiki Drag and Drop Interoperability]]
** [[Javascript Widget Tutorial]]
** [[Using TiddlyWiki as a library in another Node.js application]]
* The original developer documentation from https://tiddlywiki.com:
** [[TiddlyWiki for Developers]]
** [[TiddlyWiki Coding Style Guidelines]]

View File

@ -1,5 +1,5 @@
created: 20190202035524804
modified: 20221029161501848
modified: 20240302110658300
tags:
title: Javascript Widget Tutorial
type: text/vnd.tiddlywiki
@ -9,21 +9,23 @@ This tutorial provides step-by-step, interactive examples of how to write code f
Intended audience:
# Those who know tiddlywiki well and know programming and javascript and want to write their own widget. I don't make any effort to explain javascript here. For that you will need other resources.
# Those who know tiddlywiki well and know programming and javascript and want to write their own widget.
# Those who know tiddlywiki well and don't know javascript, but want to understand more about how tiddlywiki works. You should be able to skim through and interact with the demos and learn something.
!The tutorial
*[[Undefined widget tutorial]]
*[[Do nothing widget tutorial]]
*[[Hello World widget tutorial]]
*[[Widget refresh tutorial part I]]
*[[Widget refresh tutorial part II]]
*[[Widget refresh tutorial part III]]
*[[Widget attributes tutorial part I]]
*[[Widget attributes tutorial part II]]
*[[Child widgets tutorial]]
We don't make any effort to explain javascript here. For that you will need other resources, like [[MDN|https://developer.mozilla.org/en-US/docs/Web/JavaScript]].
! Notes
!! The tutorial
* [[Undefined widget tutorial]]
* [[Do nothing widget tutorial]]
* [[Hello World widget tutorial]]
* [[Widget refresh tutorial part I]]
* [[Widget refresh tutorial part II]]
* [[Widget refresh tutorial part III]]
* [[Widget attributes tutorial part I]]
* [[Widget attributes tutorial part II]]
* [[Child widgets tutorial]]
!! Notes
tiddlywiki doesn't support dynamically reloading javascript. If you change a javascript tiddler, then you need to save and reload the wiki before the changes will take affect.
@ -31,7 +33,11 @@ To avoid the need for such reloads, the excellent [[innerwiki plugin|https://tid
Without the need for reloads, a tiddlywiki instance with the [[innerwiki plugin|https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/]] installed works great as a playground for interacting with tiddlywiki javascript.
! Other documentation on writing TW widgets
!! Other documentation on writing TW widgets
*WidgetModules
*[[Widgets]]
* WidgetModules
* [[Widgets]]
!! Full API doc
[[Github Pages of TW5-Typed|https://tiddly-gittly.github.io/TW5-Typed/api/classes/modules_widgets.widget]]

View File

@ -1,5 +1,5 @@
modified: 20160305222940000
created: 20160111034749658
modified: 20240302110735646
title: Using ES2016 for Writing Plugins
type: text/vnd.tiddlywiki
@ -7,7 +7,15 @@ With the advent of ES2015 (also known as ES6) and the availability of [[Babel.js
Please understand how the PluginMechanism works since this is all about writing a plugin using Babel to compile the output that will be included in the final TiddlyWiki (for example [[TiddlyWiki on Node.js]]).
!! Installing and Configuring Babel
!! Use a framework
It is recommended to use develop toolkit managed by community. For example,
# [[Modern.TiddlyDev|https://tiddly-gittly.github.io/Modern.TiddlyDev/]]
They are known as "~JavaScript Meta-Framework". With them, you can start developing in a few minutes, without hours of configuration and debugging the build steps.
!! Installing and Configuring Babel by yourself
You can install Babel using
@ -33,7 +41,9 @@ Inside your plugin project edit the file `.babelrc` and enter the following:
<<.tip "I found it easier to manage my plugins as if they were ''npm'' modules complete with a `package.json` that compiles the output via `npm run build`. See [[npm-scripts documentation|https://docs.npmjs.com/misc/scripts]] for details.">>
!! Compiling the Output
Another benefit of using such a "Meta-Framework" is that you can easily maintain your configuration, you will find it difficult to upgrade those config files after several months.
!!! Compiling the Output
Pick a folder to store the ES2015 JavaScript and a folder to output the TiddlyWiki ready JavaScript. In this example I will use `src` and `lib` respectively. With Babel installed and working I can compile all the JavaScript in the `src` folder to the `lib` folder by running this command:
@ -43,7 +53,7 @@ $ babel src -d lib
<<.warning "Babel will //not// copy over non-JavaScript files. It is up to the developer to include all the supporting files themselves. Babel only converts the ~JavaScript files (ending in `.js`) from the `src` folder to the `lib` folder.">>
!! Imports and Exports
!!! Imports and Exports
In a plugin written pre-ES2015 one would `require` a module through TiddlyWiki like so:
@ -71,7 +81,7 @@ export { MyWidget as mywidget };
It is important to understand that in ES2016 the ''default'' export is not supported in TiddlyWiki. This is mostly because the core code expects specific properties to be attached to the `exports` variable. Bable's `export` conversion plays well with this //except// with the default export.
!! Classes
!!! Classes
In the example of a widget ES2016 plays well with class inheritance. To contrast the typical Widget definition would look something like this:
@ -104,7 +114,7 @@ class NameWidget extends Widget {
}
```
!!! Non Class Modules
!!!! Non Class Modules
For non class modules you can use the `export` keyword. Here is a simple [[Startup Module|ModuleType]]:
@ -122,11 +132,11 @@ export const params = {};
export function run() {…}
```
!! Polyfills
!!! Polyfills
ES2015 comes with some features that are part of the JavaScript core objects. These are not supported by all browsers. To use these features in [[most browsers|BrowserCompatibility]] you will need a <<.def "polyfill">>. Babel has a polyfill package that you can include. See [[Adding Babel Polyfill to TiddlyWiki]] for how to accomplish this.
!! Example
!!! Example
Here is an example ES2015 plugin/widget that will show the time and update it:

View File

@ -0,0 +1,5 @@
title: Using TiddlyWiki as a library in another Node.js application
Node.js applications can include TiddlyWiki as a library so that they can use wikitext rendering.
See the demo at https://github.com/Jermolene/TiddlyWiki5DemoApp

View File

@ -0,0 +1,6 @@
created: 20240311150859344
modified: 20240311150859344
title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout
type: text/vnd.tiddlywiki
fluid-fixed

View File

@ -0,0 +1,12 @@
created: 20240313100515958
modified: 20240313103959789
tags: Editions
title: TiddlyWiki Docs PR Maker
''~TiddlyWiki Docs PR Maker'' is a special edition of tiddlywiki.com designed to help you contribute to and improve the documentation made by [[@saqimtiaz|https://github.com/saqimtiaz/]].
https://saqimtiaz.github.io/tw5-docs-pr-maker/
All changes made to the documentation can be very easily submitted to GitHub -- the pull request will be automatically made, hence the "PR Maker" name of the edition.
You will need to create a free ~GitHub account and sign the [[Contributor License Agreement]] before using the Docs PR Maker. You can find more details about contributing to the documentation [[here|Improving TiddlyWiki Documentation]].

View File

@ -1,5 +1,5 @@
created: 20140820151051019
modified: 20190115165616599
modified: 20240313114828368
tags: Community
title: Improving TiddlyWiki Documentation
type: text/vnd.tiddlywiki
@ -8,9 +8,29 @@ Anyone can submit improvements to the TiddlyWiki documentation that appears on h
<<.warning """If you already know GitHub, note that documentation updates must be directed to the `tiddlywiki-com` branch""">>
! Before you start editing
# Read and observe the [[Documentation Style Guide]]
# Create an account on https://github.com if you don't already have one
# If you haven't done so already, sign the [[Contributor License Agreement]] as described in [[Signing the Contributor License Agreement]]
! Editing and submitting your edits
You can choose to edit the documentation using the [[TiddlyWiki Docs PR Maker]] or directly in ~GitHub. The first method is especially recommended for users not familiar with ~GitHub.
!! Using [[Docs PR Maker|TiddlyWiki Docs PR Maker]] edition
# Go to https://saqimtiaz.github.io/tw5-docs-pr-maker/ or click the link displayed in the ribbon underneath the title when editing a tiddler on tiddlywiki.com
# Go through the quick introduction where you will need to provide your ~GitHub username and a ~GitHub access token (you will be guided in creating one)
# Edit or create tiddlers to update the documentation, the wiki will keep track of all changes
# Click the "Submit updates" button and check if all the tiddlers that you edited are included in the submission; if not, drag them into the box
# Provide a concise title and description of your changes (see the rules about titling pull requests in [[contribution guidelines|Contributing]])
# Submit your changes:
** "Save as draft" will create a //draft// pull request, this is useful if you don't want the changes to be merged //yet//, because you want to work on it later or discuss it first
** "Submit documentation update" will create a pull request, which will be immediately available for review and merging
!! Using ~GitHub
# On https://tiddlywiki.com, click "edit" on the tiddler you want to improve
# You should see a pink banner with the text: //Can you help us improve this documentation? Find out how to edit this tiddler on ~GitHub//
# Click on the external link ...''this tiddler on ~GitHub''

View File

@ -0,0 +1,42 @@
created: 20240309135835396
modified: 20240309142156125
tags: Concepts
title: Bags and Recipes
type: text/vnd.tiddlywiki
The bags and recipes model is a reference architecture for how tiddlers can be shared between multiple wikis. It was first introduced by TiddlyWeb in 2008.
The principles of bags and recipes can be simply stated:
# Tiddlers are stored in named "bags"
# Bags have access controls that determines which users can read or write to them
# Recipes are named lists of bags, ordered from lowest priority to highest
# The tiddlers within a recipe are accumulated in turn from each bag in the recipe in order of increasing priority. Thus, if there are multiple tiddlers with the same title in different bags then the one from the highest priority bag will be used as the recipe tiddler
# Wikis are composed by splicing the tiddlers from the corresponding recipe into the standard TW5 HTML template
A very simple example of the recipe/bag model might be for a single user who maintains the following bags:
* ''recipes'' - tiddlers related to cooking recipes
* ''work'' - tiddlers related to work
* ''app'' - common tiddlers for customising TiddlyWiki
Those bags would be used with the following recipes:
* ''recipes'' --> recipes, app - wiki for working with recipes, with common custom components
* ''work'' --> work, app - wiki for working with work, with common custom components
* ''app'' --> app - wiki for maintaining custom components
All of this will work dynamically, so changes to the app bag will instantly ripple into the affected hosted wikis.
A more complex example might be for a teacher working with a group of students:
* ''student-{name}'' bag for each students work
* ''teacher-course'' bag for the coursework, editable by the teacher
* ''teacher-tools'' bag for custom tools used by the teacher
Those bags would be exposed through the following hosted wikis:
* ''student-{name}'' hosted wiki for each students work, including the coursework material
* ''teacher-course'' hosted wiki for the coursework, editable by the teacher
* ''teacher'' hosted wiki for the teacher, bringing together all the bags, giving them an overview of all the students work

View File

@ -1,11 +1,11 @@
created: 20130825213300000
modified: 20220109101407050
modified: 20240416103247799
tags: Concepts
title: TiddlerFields
type: text/vnd.tiddlywiki
\define lingo-base() $:/language/Docs/Fields/
~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names must be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period).
~TiddlerFields are name:value pairs that make up a [[tiddler|Tiddlers]]. Field names may contain any combination of characters (prior to [[v5.2.0|Release 5.2.0]], fields were constrained to be lowercase letters, digits or the characters `-` (dash), `_` (underscore) and `.` (period)).
The standard fields are:

View File

@ -2,8 +2,9 @@ created: 201308300841
modified: 20170127221451610
tags: Definitions
title: TiddlyWeb
type: text/vnd.tiddlywiki
TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web.
TiddlyWeb is a reference implementation for an interface to put [[Tiddlers]] on the web using the [[Bags and Recipes]] model.
It was created by a team led by Chris Dent at [[Osmosoft]] under [[BT]] from 2008 to 2012.
@ -16,5 +17,3 @@ Other implementations of the API include:
* [[TiddlyWiki App Engine Server|https://github.com/rsc/tiddly]], a 300-line Go implementation from Russ Cox
* [[TiddlyWiki 5 server module|https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/commands/server.js]], the bare-bones subset of the API implemented in TiddlyWiki version 5 for Node.js
* [[tiddly-wiki-server|https://github.com/nathanielknight/tiddly-wiki-server]], an implementation based on Rust and SQLite
As of early 2017, none is currently as complete as TiddlyWeb itself.

View File

@ -0,0 +1,9 @@
created: 20240309100338678
modified: 20240309135821423
tags: Definitions
title: TiddlyWebAdaptor
type: text/vnd.tiddlywiki
TiddlyWebAdaptor is a component of [[TiddlyWiki on Node.js]]. It provides the means to synchronise changes to tiddlers from the browser to a server, and from the server to the browser. It can be found in the plugin [[$:/plugins/tiddlywiki/tiddlyweb]].
TiddlyWebAdaptor was designed to be compatible both with TiddlyWeb and with TiddlyWiki's own built-in server mechanism. The [[Bags and Recipes]] model is fully supported by [[TiddlyWeb]], but TiddlyWiki's built-in server only supports a simplified model with a single bag and a single recipe.

View File

@ -1,13 +0,0 @@
created: 20211002204500000
tags: [[Filter Operators]]
title: backtranscludes Operator
type: text/vnd.tiddlywiki
caption: backtranscludes
op-purpose: find the titles that transcludes to each input title
op-input: a [[selection of titles|Title Selection]]
op-parameter: none
op-output: any non-[[system|SystemTiddlers]] titles that contain [[transclusion|Transclusion]] to the input titles
<<.from-version 5.3.4>> Similar to [[backlinks|backlinks Operator]]. Each input title is processed in turn. The corresponding tiddler's list of backtranscludes is generated, sorted alphabetically by title, and then [[dominantly appended|Dominant Append]] to the operator's overall output.
<<.operator-examples "backtranscludes">>

View File

@ -0,0 +1,9 @@
created: 20240308122813807
modified: 20240308122916812
tags: [[Operator Examples]] [[sha256 Operator]]
title: sha256 Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[test]sha256[]]">>
<<.operator-example 2 "[[test]sha256[64]]">>

View File

@ -1,6 +1,6 @@
created: 20210618133745003
from-version: 5.2.0
modified: 20230710073315595
modified: 20240312202834547
rp-input: the filter output of all previous runs so far
rp-output: the input titles as modified by the result of this filter run
rp-purpose: modify input titles by the result of evaluating this filter run for each item
@ -12,7 +12,7 @@ type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":map" | - )
( ":map" (: ":flat" | - ) | - )
[[run|"Filter Run"]]
"""/>

View File

@ -1,6 +1,6 @@
created: 20210428083929749
from-version: 5.2.0
modified: 20230322140722470
modified: 20240312203002082
rp-input: the filter output of all previous runs so far
rp-output: output titles replace the output of previous filter runs
rp-purpose: sort the input titles by the result of evaluating this filter run for each item
@ -12,9 +12,9 @@ type: text/vnd.tiddlywiki
<$railroad text="""
\start none
\end none
( ":sort" )
( ( ":sort" )
( : ":string" | ":alphanumeric" | ":number" | ":integer" | ":version" | ":date" )
( : ":casesensitive" /"required for string and alphanumeric"/ | ":caseinsensitive" /"required for string and alphanumeric"/ | ":reverse" /"optional"/ | - )
( : ":casesensitive" /"required for string and alphanumeric"/ | ":caseinsensitive" /"required for string and alphanumeric"/ | ":reverse" /"optional"/ | - ) | - )
[[run|"Filter Run"]]
"""/>

View File

@ -1,10 +1,11 @@
caption: Firefox
created: 20140811170425199
modified: 20211114031651878
modified: 20230803213024843
tags: GettingStarted
title: GettingStarted - Firefox
type: text/vnd.tiddlywiki
Firefox provides the best user experience for using TiddlyWiki with the TiddlyFox browser extension.
Firefox provides the best user experience for using TiddlyWiki with the following browser extensions:
<<list-links filter:"[tag[Firefox]delivery[Browser Extension]] -[[Saving with TiddlyFox]]">>
{{Saving with TiddlyFox}}
{{Saving with FireFox}}

View File

@ -4,10 +4,16 @@ tags: Learning
title: Concatenating text and variables using macro substitution
type: text/vnd.tiddlywiki
!! Important
<<.from-version "5.3.0">> It is recommended to use [[substituted attributes|Substituted Attribute Values]] or the [[substitute filter operator|substitute Operator]] to concatenate text and variables.
It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text.
---
!! What is Wrong
You might, for instance want to set up a template for your customer database, where links will automatically refer to additional contact information about your customer. Inside your tiddler, you might try something like this:
<<.bad-example "`[[Additional Info|<<currentTiddler>>-Contact]]`">>

View File

@ -1,6 +1,7 @@
code-body: yes
created: 20150221145803000
modified: 20240310124126491
title: $:/editions/tw5.com/macro-examples/tags-of-current-tiddler
type: text/vnd.tiddlywiki
\define tags-of-current-tiddler() {{!!tags}}
\procedure tags-of-current-tiddler() {{!!tags}}

View File

@ -1,6 +1,7 @@
code-body: yes
created: 20150228123855000
modified: 20150228123921000
modified: 20240310133309881
title: $:/editions/tw5.com/macro-examples/tv-get-export-image-link
type: text/vnd.tiddlywiki
\define tv-get-export-image-link(src) https://www.tiddlywiki.com/$src$
\function tv-get-export-image-link(src) [[https://www.tiddlywiki.com/$(src)$]substitute[]]

View File

@ -1,8 +1,9 @@
code-body: yes
created: 20150228120252000
modified: 20240310124217005
title: $:/editions/tw5.com/macro-examples/tv-wikilink-tooltip
type: text/vnd.tiddlywiki
\define tv-wikilink-tooltip()
\procedure tv-wikilink-tooltip()
<$transclude field="tooltip">(<$transclude field="caption"/>)</$transclude>
\end

View File

@ -1,9 +1,13 @@
created: 20150221105732000
modified: 20150221222352000
tags: [[Macro Syntax]]
tags: [[Macro Syntax]] $:/deprecated
title: Macro Call Syntax
type: text/vnd.tiddlywiki
<<.deprecated-since "5.3.0" "Procedure Call Syntax">>
----------
<<.preamble """What follows is a formal presentation of the syntax of the WikiText syntax for macro calls, using [[railroad diagrams|Railroad Diagrams]]. A [[simpler overview|Macro Calls in WikiText]] is also available.""">>
<$railroad text="""

View File

@ -1,9 +1,13 @@
created: 20150220200255000
modified: 20150221222349000
tags: [[Macro Syntax]]
tags: [[Macro Syntax]] $:/deprecated
title: Macro Definition Syntax
type: text/vnd.tiddlywiki
<<.deprecated-since "5.3.0" "Procedure Definition Syntax">>
----------
<<.preamble """What follows is a formal presentation of the syntax of the `\define` pragma, using [[railroad diagrams|Railroad Diagrams]]. A [[simpler overview|Macro Definitions in WikiText]] is also available.""">>
<$railroad text="""

View File

@ -0,0 +1,33 @@
created: 20240310165023000
modified: 20240310172648116
tags: [[Procedure Syntax]]
title: Procedure Call Syntax
type: text/vnd.tiddlywiki
<<.preamble """What follows is a formal presentation of the syntax of the WikiText syntax for procedure calls, using [[railroad diagrams|Railroad Diagrams]].""">>
!! procedure-name
<$railroad text="""
"<<" [[ procedure-name |Procedures]] [: [[whitespace|"Filter Whitespace"]] [:{param-value}] ]">>"
"""/>
* The [[procedure's|Procedures]] <<.place procedure-name>> is a sequence of non-whitespace characters other than `(` or `>`.
* <<.place whitespace>> denotes a sequence of [[whitespace characters|Filter Whitespace]].
!!! param-value
Each ''individual'' <<.place param-value>> has the following syntax:
<$railroad text="""
\start none
\end none
[: param-name [:[[whitespace|"Filter Whitespace"]]] ":" [:[[whitespace|"Filter Whitespace"]]] ] value [: [[whitespace|"Filter Whitespace"]] ]
"""/>
* The <<.place param-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`).
* The <<.place value>> is specified as follows:
<$railroad text={{$:/editions/tw5.com/railroad/macro-parameter-value}}/>

View File

@ -0,0 +1,93 @@
created: 20240310165023000
modified: 20240310175033730
tags: [[Procedure Syntax]]
title: Procedure Definition Syntax
type: text/vnd.tiddlywiki
<<.preamble """What follows is a formal presentation of the syntax of the [[Pragma: \procedure]], using [[railroad diagrams|Railroad Diagrams]]. """>>
! \procedure
There are 2 types of procedure definitions
* Single line definitions
* Multi line definitions
!! Single Line
Single line definitions should only be used for very short bodies, where the procedure name, params and the body fit into 1 line terminated with a line-feed.
<$railroad text="""
"\procedure"
[[<"space">|"Filter Whitespace"]]
"procedure-name"
<"(params)">
[:[[<"space">|"Filter Whitespace"]]]
"body"
"lf"
"""/>
!! Multi Line
The majority of procedure definitions will have a body, that spans over several lines of wikitext. Those procedure definitions are terminated using the "\end" pragma
<$railroad text="""
"\procedure"
[[<"space">|"Filter Whitespace"]]
"procedure-name"
<"(params)">
[:[[<"space">|"Filter Whitespace"]]]
body
"\end"
"""/>
The [[procedure-name|Procedures]] is a sequence of non-whitespace characters other than `(` or `>`.
* <<.place procedure-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`)
* <<.place body>> is wikitext including [[nested procedures|Pragma: \procedure]]
* <<.place space>> denotes a sequence of [[whitespace characters|Filter Whitespace]]
!! params
The parameter declaration list <<.place (params)>> has the following syntax:
<$railroad text="""
\start none
\end none
"(" [:"sep"] [:{ parameter "sep" }] ")"
"""/>
* <<.place sep>> is any sequence of characters that does not match a <<.place param-name>>. <br>Among other things, this includes commas, spaces and linefeeds.
Each ''individual'' <<.place parameter>> has the following syntax:
<$railroad text="""
\start none
\end none
"param-name" [: [:[[<"space">|"Filter Whitespace"]]] ":" [:[[<"space">|"Filter Whitespace"]]] default ]
"""/>
* <<.place param-name>> is a sequence of letters (`A`--`Z`, `a`--`z`), digits (`0`--`9`), hyphens (`-`) and underscores (`_`).
* <<.place default>> is an optional value of a parameter is specified as follows:
<$railroad text={{$:/editions/tw5.com/railroad/macro-parameter-value}}/>
!! body
The <<.place body>> of the definition has the following syntax:
<$railroad text="""
\start none
\end none
{[[<"wikitext">|WikiText]] "lf"}
"""/>
* <<.place wikitext>> is any sequence of characters that doesn't terminate the macro definition.
** If [[nested procedures|Pragma: \procedure]] are used they need to be at the start of the wikitext. There are the same rules as if the wikitext would be in a tiddler.
** Pragmas need to be before standard wikitext.
* <<.place lf>> denotes a linefeed.

View File

@ -0,0 +1,11 @@
created: 20240310165023000
modified: 20240310173318213
tags: Procedures
title: Procedure Syntax
type: text/vnd.tiddlywiki
Plain text description can be found at [[Procedures]]
<<list-links filter:"[tag[Procedure Syntax]]">>
<<.tip "The railroad boxes in the linked tiddlers can be used to navigate.">>

View File

@ -12,6 +12,6 @@ The rules governing refresh throttling are:
** Has the field `draft.of`
** Has the field `throttle.refresh`
** Has a title prefixed with `$:/temp/volatile/`
* If the refresh cycle is to be throttled, a timer is set for the internal specified in [[$:/config/Drafts/TypingTimeout|Hidden Setting: Typing Refresh Delay]] (cancelling any preciously set timer)
* If the refresh cycle is to be throttled, a timer is set for the internal specified in [[$:/config/Drafts/TypingTimeout|Hidden Setting: Typing Refresh Delay]] (cancelling any previously set timer)
** When the timer fires, the refresh cycle is triggered, passing the aggregated titles of all the deferred refresh cycles

View File

@ -0,0 +1,34 @@
title: WidgetMessage: tm-http-request Example - Basic Authentication
tags: $:/tags/Global
!! HTTP Basic Authentication
[[HTTP Basic Authentication|https://en.wikipedia.org/wiki/Basic_access_authentication]] is a simple scheme for HTTP clients pass a username and password to an HTTP server.
The credentials are passed via the "Authorization" header as the string "Basic " (note the space) followed by the base64-encoded username and password joined with a colon.
Here is a simple, illustrative example:
```
\procedure get-tiddler-list-from-tiddlywiki-server(url,username,password)
\procedure completion-get-json()
\import [subfilter{$:/core/config/GlobalImportFilter}]
<$action-log msg="In completion-get-json"/>
<$action-log/>
\end completion-get-json
<$action-sendmessage
$message="tm-http-request"
url=<<url>>
method="GET"
header-Authorization={{{ [<username>addsuffix[:]addsuffix<password>encodebase64[]addprefix[Basic ]] }}}
oncompletion=<<completion-get-json>>
/>
\end get-tiddler-list-from-tiddlywiki-server
<$button>
<<get-tiddler-list-from-tiddlywiki-server url:"http://127.0.0.1:8080" username:"Joe" password:"Bloggs">>
Download
</$button>
```

View File

@ -51,3 +51,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin
* [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]]
* [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dog]]
* Example of using HTTP Basic Authentication: [[WidgetMessage: tm-http-request Example - Basic Authentication]]

View File

@ -1,5 +1,5 @@
created: 20221007124007426
modified: 20230419103154329
modified: 20240310173130052
tags: Concepts Reference
title: Procedures
type: text/vnd.tiddlywiki
@ -18,11 +18,13 @@ The name wrapped in double angled [[brackets|Brackets]] is used a shorthand way
```
<<my-procedure>>
<<my-procedure "The parameter">>
<<my-procedure parameter:"The parameter">>
```
The parameters that are specified in the procedure call are made available as variables.
<<.tip """If a procedure has more than 1 parameter, it is highly encouraged to use "named parameters", as shown in the second example above. Even if it is more to type, it will pay off in the long run.""">>
!! How Procedures Work
Procedures are implemented as a special kind of [[variable|Variables]]. The only thing that distinguishes them from ordinary variables is the way that the parameters are handled.
@ -32,4 +34,4 @@ Procedures are implemented as a special kind of [[variable|Variables]]. The only
* [[Procedure Definitions]] describes how to create procedures
* [[Procedure Calls]] describes how to use procedures
* [[Procedure Parameter Handling]] describes how procedure parameters work
* [[Procedure Syntax]] is a formal syntax description using railroad diagrams

View File

@ -0,0 +1,17 @@
caption: Saving with FireFox
created: 20230803205140949
modified: 20230803213246739
tags: Saving Firefox
title: Saving with FireFox
# Restart [[Firefox]]
# [[Download]] an empty TiddlyWiki by clicking this button:
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` or `.htm` extension
# Open the file in [[Firefox]]
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar
#* Look for the yellow notification ''Saved wiki'' at the top right of the window
# Refresh the browser window to verify that your changes have been saved correctly

View File

@ -5,26 +5,9 @@ created: 20131221085742684
delivery: Browser Extension
description: Browser extension for older versions of Firefox
method: save
modified: 20200507105421421
modified: 20230806001436106
tags: Saving Firefox
title: Saving with TiddlyFox
type: text/vnd.tiddlywiki
If you're using [[Firefox for Android]], see the instructions for [[Saving with TiddlyFox on Android]].
# Ensure you have a version of Firefox before version 57. ~TiddlyFox will not work with Firefox 57 and on. For Firefox 57 and on, consider using the following instead: <<list-links filter:"[tag[Firefox]delivery[Browser Extension]] -[[Saving with TiddlyFox]]">>
# Install the latest release of the TiddlyFox extension from:
#* https://addons.mozilla.org/en-GB/firefox/addon/tiddlyfox/
# Restart [[Firefox]]
# [[Download]] an empty TiddlyWiki by clicking this button:
#> {{$:/editions/tw5.com/snippets/download-empty-button}}
# Locate the file you just downloaded
#* You may rename it, but be sure to keep the `.html` or `.htm` extension
# Open the file in [[Firefox]]
#* If you are using TiddlyFox v1.x.x, you will need to click ''OK'' in response to the prompt from TiddlyFox that asks whether to enable saving for this file
#* If you are using TiddlyFox v2.x.x you will need to click on the icon of a kitten standing on a blue globe to activate saving. There is no prompt in v2.0.1.
#** For TiddlyFox v2.0.1, you can not be using Private Browsing mode nor can you be using "Never Remember History".
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar
#* Look for the yellow notification ''Saved wiki'' at the top right of the window
# Refresh the browser window to verify that your changes have been saved correctly
<<.deprecated-since "FireFox 57" "Saving with FireFox">>

View File

@ -1,174 +1,199 @@
created: 20150110182600000
modified: 20230325161424684
modified: 20240224170607731
tags: [[Improving TiddlyWiki Documentation]]
title: Documentation Macros
type: text/vnd.tiddlywiki
The following macros are used throughout ~TiddlyWiki's documentation. Their names start with a dot to keep them out of the way of names that a user might try experimenting with.
!General
! General
|!Macro |!Used for |!Example |
|.def |the defining instance of a term |<<.def widget>> |
|.em |minor emphasis within a sentence |<<.em not>> |
|.place |a placeholder for the user to fill in |<<.place tagname>> |
|.strong |major emphasis within a tiddler |<<.strong Important!>> |
|.word |a mention of an ordinary word or phrase |<<.word "hello world">> |
|.icon |an icon, sized to match the surrounding text |<<.icon "$:/core/images/globe">> |
|Macro |Used for |Example |Rendered|h
|.def |the defining instance of a term |`<<.def widget>>` |<<.def widget>> |
|.em |minor emphasis within a sentence |`<<.em not>>` |<<.em not>> |
|.place |a placeholder for the user to fill in |`<<.place tagname>>` |<<.place tagname>> |
|.strong |major emphasis within a tiddler |`<<.strong Important!>>` |<<.strong Important!>> |
|.word |a mention of an ordinary word or phrase |`<<.word "hello world">>` |<<.word "hello world">> |
|.icon |an icon, sized to match the surrounding text |`<<.icon "$:/core/images/globe">>` |<<.icon "$:/core/images/globe">> |
!Advice
! Textboxes
|!Macro |!Used for |!Example |
|^.tip |^hints and tips |<<.tip "Turn your screen on, otherwise<br>you won't be able to see much.">> |
|^.warning |^warning advice |<<.warning "Make a backup of your file<br>before you upgrade.">> |
!! Textbox Parameters
!Blocks
|!Macro |!Used for |
|.preamble |an introductory sentence that stands apart from the rest of the tiddler |
; text
: Text to be shown in the box
!Tiddlers and fields
; title
: A title shown as an HTML STRONG element
|!Macro |!Used for |!Example |
|.tid |a tiddler title |<<.tid Example>> |
|.tag |a tag |<<.tag Example>> |
|.field |a field name |<<.field example>> |
|.value |a field value |<<.value "example value">> |
|.op |a filter operator |<<.op backlinks>> |
|.var |a variable or macro name |<<.var currentTiddler>> |
|.wid |a widget name |<<.wid list>> |
|.attr |an attribute name |<<.attr filter>> |
|.param |a macro parameter name |<<.param text>> |
|.tiddler-fields |a list of tiddler fields |<<.tiddler-fields "Monday">> |
; icon
: Core icons can be found at [[Icon Gallery]]
; class
: An optional custom class can be added to the text block. It will overwrite the defaults. To keep the defaults, ''add them'' to the custom class settings.
: ''.note''-macro defaults to `doc-note`
: ''.tip''-macro defaults to `doc-tip`
: ''.warning''-macro defaults to `doc-warning`
!! Textbox Examples
|Macro |Used for |Example |Renderd |h
|^.infoBox |^Text-box with an icon |`<<.infoBox text:"A generic ...">>` |<<.infoBox "A generic text box, with an optional title and a custom icon">> |
|^.note|^Infos with a title |`<<.note text:"Some text ...">>` |<<.note "Some text in a box with a title by default">> |
|^.tip |^hints and tips |`<<.tip text:"Eg: Turn ...">>` |<<.tip "Eg: Turn your screen on, otherwise<br>you won't be able to see much.">> |
|^.warning |^warning advice |`<<.warning text:"Eg: Make a backup ...">>` |<<.warning "Eg: Make a backup of your file<br>before you upgrade.">> |
!Links
|!Macro |!Used for |!Example |
|.link |a link containing WikiText |<<.link "^^an^^ ~~example~~" Example>> |
|.clink |a code link |<<.clink `<$list>` ListWidget>> |
|.dlink |a link on a defining instance of a term |<<.dlink widget Widgets>> |
|.dlink-ex |an external link on a defining instance of a term |<<.dlink-ex Example "http://example.com/">> |
|.flink |a link to a field |<<.flink ListField>> |
|.mlink |a link to a macro |<<.mlink qualify>> |
|.mlink2 |a link to a macro, with specified target |<<.mlink2 foo "Examples of Macros">> |
|.olink |a link to an operator |<<.olink prefix>> |
|.olink2 |a link to an operator, with specified target |<<.olink2 foo prefix>> |
|.vlink |a link to a variable |<<.vlink currentTiddler>> |
|.vlink2 |a link to a variable, with specified target |<<.vlink2 foo "Examples of Variables">> |
|.wlink |a link to a widget |<<.wlink ButtonWidget>> |
|.wlink2 |a link to a widget, with specified text |<<.wlink2 foo ButtonWidget>> |
! Blocks
!Tabs
|!Macro |!Used for |!Example |
|Macro |Example |Used for |h
|.preamble |`<<.preamble "your text comes here">>` |<<.preamble "an introductory sentence that stands apart from the rest of the tiddler">> |
! Tiddlers and Fields
|Macro |Used for |Example |Rendered |h
|.tid |a tiddler title |`<<.tid Example>>` |<<.tid Example>> |
|.tag |a tag |`<<.tag Example>>` |<<.tag Example>> |
|.field |a field name |`<<.field example>>` |<<.field example>> |
|.value |a field value |`<<.value "example value">>` |<<.value "example value">> |
|.op |a filter operator |`<<.op backlinks>>` |<<.op backlinks>> |
|.var |a variable or macro name |`<<.var currentTiddler>>` |<<.var currentTiddler>> |
|.wid |a widget name |`<<.wid list>>` |<<.wid list>> |
|.attr |an attribute name |`<<.attr filter>>` |<<.attr filter>> |
|.param |a macro parameter name |`<<.param text>>` |<<.param text>> |
|.tiddler-fields |a list of tiddler fields |`<<.tiddler-fields "Monday">>` |<<.tiddler-fields "Monday">> |
! Links
|!Macro |Used for |Example |Renderd |h
|.link |link containing WikiText |`<<.link "^^an^^ ~~example~~" Example>>` |<<.link "^^an^^ ~~example~~" Example>> |
|.clink |code link |``<<.clink `<$list>` ListWidget>>`` |<<.clink `<$list>` ListWidget>> |
|.dlink |definition link for a instance of a term |`<<.dlink widget Widgets>>` |<<.dlink widget Widgets>> |
|.dlink-ex |external link to a defining instance of a term |`<<.dlink-ex Example "http://example.com/">>` |<<.dlink-ex Example "http://example.com/">> |
|.flink |field link |`<<.flink ListField>>` |<<.flink ListField>> |
|.mlink |macro link |`<<.mlink qualify>>` |<<.mlink qualify>> |
|.mlink2 |macro link with a specified target |`<<.mlink2 foo "Examples of Macros">>` |<<.mlink2 foo "Examples of Macros">> |
|.olink |operator link |`<<.olink prefix>>` |<<.olink prefix>> |
|.olink2 |operator link with specified target |`<<.olink2 foo prefix>>` |<<.olink2 foo prefix>> |
|.vlink |variable link |`<<.vlink currentTiddler>>` |<<.vlink currentTiddler>> |
|.vlink2 |variable link with specified target |`<<.vlink2 foo "Examples of Variables">>` |<<.vlink2 foo "Examples of Variables">> |
|.wlink |widget link |`<<.wlink ButtonWidget>>` |<<.wlink ButtonWidget>> |
|.wlink2 |widget link with specified text |`<<.wlink2 foo ButtonWidget>>` |<<.wlink2 foo ButtonWidget>> |
! Keyboard Shortcuts
|Macro |Used for |Example |Rendered |h
|.key |a key on the keyboard |`<<.key Escape>>` |<<.key Escape>> |
|.keys |a key combination |`<<.keys Ctrl+Enter>>` |<<.keys Ctrl+Enter>> |
! Doc-Tabs
See: [[CheckboxWidget]]
|Macro |Used for |Example |h
|.doc-tabs |showing a tab set in a documentation tiddler | -- |
|.doc-tab-link |button to activate a tab | -- |
|.widget-attr-link |button with a widget attribute name to activate a tab | -- |
! Sidebar Tabs
!User interface
|Macro |Used for |Example |Rendered |h
|.sidebar-tab |the name of a sidebar tab |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> |
|.more-tab |the name of a subtab of the More tab |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> |
|.info-tab |the name of a tiddler info tab |`<<.info-tab Fields>>` |<<.info-tab Fields>> |
|.controlpanel-tab |the name of a Control Panel tab |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> |
|.advancedsearch-tab |the name of an Advanced Search tab |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> |
|.toc-tab |name of the tw5.com TOC tab |`<<.toc-tab>>` |<<.toc-tab>> |
|.example-tab |an example tab name |`<<.example-tab "Notes">>` |<<.example-tab "Notes">> |
|!Macro |!Used for |!Example |
|.key |a key on the keyboard |<<.key Escape>> |
|.keycombo |a key combination |<<.keycombo Ctrl Enter>> |
!! Parameters for .sidebar-tab
!Tabs
|Open |`<<.sidebar-tab Open>>` |<<.sidebar-tab Open>> |
|Recent |`<<.sidebar-tab Recent>>` |<<.sidebar-tab Recent>> |
|Tools |`<<.sidebar-tab Tools>>` |<<.sidebar-tab Tools>> |
|More |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> |
|!Macro |!Used for |!Example |
|.sidebar-tab |the name of a sidebar tab |<<.sidebar-tab More>> |
|.more-tab |the name of a subtab of the More tab |<<.more-tab Shadows>> |
|.info-tab |the name of a tiddler info tab |<<.info-tab Fields>> |
|.controlpanel-tab |the name of a Control Panel tab |<<.controlpanel-tab Settings>> |
|.advancedsearch-tab |the name of an Advanced Search tab |<<.advancedsearch-tab Filter>> |
|.toc-tab |name of the tw5.com TOC tab |<<.toc-tab>> |
|.example-tab |an example tab name |<<.example-tab "Notes">> |
!! Parameters for .more-tab
!!Parameters for .sidebar-tab
|All |`<<.more-tab All>>` |<<.more-tab All>> |
|Recent |`<<.more-tab Recent>>` |<<.more-tab Recent>> |
|Tags |`<<.more-tab Tags>>` |<<.more-tab Tags>> |
|Missing |`<<.more-tab Missing>>` |<<.more-tab Missing>> |
|Drafts |`<<.more-tab Drafts>>` |<<.more-tab Drafts>> |
|Orphans |`<<.more-tab Orphans>>` |<<.more-tab Orphans>> |
|Types |`<<.more-tab Types>>` |<<.more-tab Types>> |
|System |`<<.more-tab System>>` |<<.more-tab System>> |
|Shadows |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> |
|Open |<<.sidebar-tab Open>> |
|Recent |<<.sidebar-tab Recent>> |
|Tools |<<.sidebar-tab Tools>> |
|More |<<.sidebar-tab More>> |
!! Parameters for .info-tab
!!Parameters for .more-tab
|Tools |`<<.info-tab Tools>>` |<<.info-tab Tools>> |
|References |`<<.info-tab References>>` |<<.info-tab References>> |
|Tagging |`<<.info-tab Tagging>>` |<<.info-tab Tagging>> |
|List |`<<.info-tab List>>` |<<.info-tab List>> |
|Listed |`<<.info-tab Listed>>` |<<.info-tab Listed>> |
|Fields |`<<.info-tab Fields>>` |<<.info-tab Fields>> |
|Advanced |`<<.info-tab Advanced>>` |<<.info-tab Advanced>> |
|All |<<.more-tab All>> |
|Recent |<<.more-tab Recent>> |
|Tags |<<.more-tab Tags>> |
|Missing |<<.more-tab Missing>> |
|Drafts |<<.more-tab Drafts>> |
|Orphans |<<.more-tab Orphans>> |
|Types |<<.more-tab Types>> |
|System |<<.more-tab System>> |
|Shadows |<<.more-tab Shadows>> |
!! Parameters for .controlpanel-tab
!!Parameters for .info-tab
|Info |`<<.controlpanel-tab Info>>` |<<.controlpanel-tab Info>> |
|Appearance |`<<.controlpanel-tab Appearance>>` |<<.controlpanel-tab Appearance>> |
|Settings |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> |
|Saving |`<<.controlpanel-tab Saving>>` |<<.controlpanel-tab Saving>> |
|Plugins |`<<.controlpanel-tab Plugins>>` |<<.controlpanel-tab Plugins>> |
|Tools |<<.info-tab Tools>> |
|References |<<.info-tab References>> |
|Tagging |<<.info-tab Tagging>> |
|List |<<.info-tab List>> |
|Listed |<<.info-tab Listed>> |
|Fields |<<.info-tab Fields>> |
|Advanced |<<.info-tab Advanced>> |
!! Parameters for .advancedsearch-tab
!!Parameters for .controlpanel-tab
|Standard |`<<.advancedsearch-tab Standard>>` |<<.advancedsearch-tab Standard>> |
|System |`<<.advancedsearch-tab System>>` |<<.advancedsearch-tab System>> |
|Shadows |`<<.advancedsearch-tab Shadows>>` |<<.advancedsearch-tab Shadows>> |
|Filter |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> |
|Info |<<.controlpanel-tab Info>> |
|Appearance |<<.controlpanel-tab Appearance>> |
|Settings |<<.controlpanel-tab Settings>> |
|Saving |<<.controlpanel-tab Saving>> |
|Plugins |<<.controlpanel-tab Plugins>> |
! Buttons
!!Parameters for .advancedsearch-tab
|Macro |Used for |Example |Rendered |h
|.button |a standard button name and icon |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> |
|Standard |<<.advancedsearch-tab Standard>> |
|System |<<.advancedsearch-tab System>> |
|Shadows |<<.advancedsearch-tab Shadows>> |
|Filter |<<.advancedsearch-tab Filter>> |
!! Parameters for .button
!Buttons
!!! Tiddler toolbar
|!Macro |!Used for |!Example |
|.button |a standard button name and icon |<<.button "new-tiddler">> |
|clone |`<<.button "clone">>` |<<.button "clone">> |
|close |`<<.button "close">>` |<<.button "close">> |
|close-others |`<<.button "close-others">>` |<<.button "close-others">> |
|edit |`<<.button "edit">>` |<<.button "edit">> |
|export-tiddler |`<<.button "export-tiddler">>` |<<.button "export-tiddler">> |
|info |`<<.button "info">>` |<<.button "info">> |
|more-tiddler-actions |`<<.button "more-tiddler-actions">>` |<<.button "more-tiddler-actions">> |
|new-here |`<<.button "new-here">>` |<<.button "new-here">> |
|new-journal-here |`<<.button "new-journal-here">>` |<<.button "new-journal-here">> |
|permalink |`<<.button "permalink">>` |<<.button "permalink">> |
!!Parameters for .button
!!! Edit-mode toolbar
!!!Tiddler toolbar
|cancel |`<<.button "cancel">>` |<<.button "cancel">> |
|delete |`<<.button "delete">>` |<<.button "delete">> |
|save |`<<.button "save">>` |<<.button "save">> |
|clone |<<.button "clone">> |
|close |<<.button "close">> |
|close-others |<<.button "close-others">> |
|edit |<<.button "edit">> |
|export-tiddler |<<.button "export-tiddler">> |
|info |<<.button "info">> |
|more-tiddler-actions |<<.button "more-tiddler-actions">> |
|new-here |<<.button "new-here">> |
|new-journal-here |<<.button "new-journal-here">> |
|permalink |<<.button "permalink">> |
!!! Page toolbar
!!!Edit-mode toolbar
|cancel |<<.button "cancel">> |
|delete |<<.button "delete">> |
|save |<<.button "save">> |
!!!Page toolbar
|advanced-search |<<.button "advanced-search">> |
|close-all |<<.button "close-all">> |
|control-panel |<<.button "control-panel">> |
|encryption |<<.button "encryption">> |
|export-page |<<.button "export-page">> |
|full-screen |<<.button "full-screen">> |
|home |<<.button "home">> |
|import |<<.button "import">> |
|language |<<.button "language">> |
|more-page-actions |<<.button "more-page-actions">> |
|new-journal |<<.button "new-journal">> |
|new-tiddler |<<.button "new-tiddler">> |
|permaview |<<.button "permaview">> |
|refresh |<<.button "refresh">> |
|save-wiki |<<.button "save-wiki">> |
|storyview |<<.button "storyview">> |
|tag-manager |<<.button "tag-manager">> |
|theme |<<.button "theme">> |
|advanced-search |`<<.button "advanced-search">>` |<<.button "advanced-search">> |
|close-all |`<<.button "close-all">>` |<<.button "close-all">> |
|control-panel |`<<.button "control-panel">>` |<<.button "control-panel">> |
|encryption |`<<.button "encryption">>` |<<.button "encryption">> |
|export-page |`<<.button "export-page">>` |<<.button "export-page">> |
|full-screen |`<<.button "full-screen">>` |<<.button "full-screen">> |
|home |`<<.button "home">>` |<<.button "home">> |
|import |`<<.button "import">>` |<<.button "import">> |
|language |`<<.button "language">>` |<<.button "language">> |
|more-page-actions |`<<.button "more-page-actions">>` |<<.button "more-page-actions">> |
|new-journal |`<<.button "new-journal">>` |<<.button "new-journal">> |
|new-tiddler |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> |
|permaview |`<<.button "permaview">>` |<<.button "permaview">> |
|refresh |`<<.button "refresh">>` |<<.button "refresh">> |
|save-wiki |`<<.button "save-wiki">>` |<<.button "save-wiki">> |
|storyview |`<<.button "storyview">>` |<<.button "storyview">> |
|tag-manager |`<<.button "tag-manager">>` |<<.button "tag-manager">> |
|theme |`<<.button "theme">>` |<<.button "theme">> |

View File

@ -1,6 +1,8 @@
title: $:/ContributionBanner
tags: $:/tags/EditTemplate
created: 20240313115309914
list-after: $:/core/ui/EditTemplate/title
modified: 20240313115810689
tags: $:/tags/EditTemplate
title: $:/ContributionBanner
\define base-github()
https://github.com/Jermolene/TiddlyWiki5/edit/tiddlywiki-com/editions/tw5.com/tiddlers/
@ -10,7 +12,9 @@ https://github.com/Jermolene/TiddlyWiki5/edit/tiddlywiki-com/editions/tw5.com/ti
<$list filter="[[$:/config/OriginalTiddlerPaths]getindex<draft-of>]" variable="target" >
<div class="tc-improvement-banner">
{{$:/core/images/star-filled}} Can you help us improve this documentation? [[Find out how|Improving TiddlyWiki Documentation]] to
<a href={{{ [<target>addprefix<base-github>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit this tiddler on ~GitHub</a>
<a href={{{ [<draft-of>encodeuricomponent[]addprefix[https://saqimtiaz.github.io/tw5-docs-pr-maker/#]] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit this tiddler in Docs PR Maker</a>
or
<a href={{{ [<target>addprefix<base-github>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">edit it directly on ~GitHub</a>
</div>
</$list>
</$set>

View File

@ -1,8 +1,12 @@
created: 20170126143833588
modified: 20220704174221300
modified: 20240310123352998
title: $:/deprecated
type: text/vnd.tiddlywiki
Deprecated features of TiddlyWiki are those that have been superseded by newer, improved ways of doing the same thing.
Deprecated features will still work, but are not recommended for new content.
''Tiddlers tagged'' $:/deprecated:
<<list-links filter:"[tag[$:/deprecated]]">>

View File

@ -7,6 +7,3 @@ type: text/vnd.tiddlywiki
Deprecated features are marked with a special warning button. See: [[How to apply custom styles by tag]] for an example.
''Tiddlers tagged `$:/deprecated`''
><<list-links "[tag[$:/deprecated]]">>

View File

@ -1,27 +1,47 @@
title: $:/editions/tw5.com/TiddlerInfo/Sources
tags: $:/tags/TiddlerInfo
caption: Sources
code-body: yes
created: 20240313090915565
modified: 20240313115026563
tags: $:/tags/TiddlerInfo
title: $:/editions/tw5.com/TiddlerInfo/Sources
\define static-link-base()
https://tiddlywiki.com/static/$(title)$.html
\function static-link-base() [[https://tiddlywiki.com/static/$(title)$.html]substitute[]]
\function github-link-base()
[[https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$]substitute[]]
\end
\define make-static-link()
\procedure make-static-link()
\whitespace trim
<$set name="title" filter="[<currentTiddler>encodeuricomponent[]encodeuricomponent[]]" select="0">
<a href=<<static-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<static-link-base>>/></a>
<a href=<<static-link-base>>
class="tc-tiddlylink-external"
target="_blank"
rel="noopener noreferrer"
>
<$text text=<<static-link-base>>/>
</a>
</$set>
\end
\define github-link-base()
https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$
\procedure make-github-link()
<$set name="title" value={{{ [[$:/config/OriginalTiddlerPaths]getindex<currentTiddler>] }}}>
<$set name="title" filter="[<title>encodeuricomponent[]]" select="0">
<a href=<<github-link-base>>
class="tc-tiddlylink-external"
target="_blank"
rel="noopener noreferrer"
>Link to "<$text text=<<currentTiddler>>/>" on github.com</a>
</$set>
</$set>
\end
\define make-github-link()
<$set name="title" value={{$:/config/OriginalTiddlerPaths##$(currentTiddler)$}}>
<$set name="title" filter="[<title>encodeuricomponent[]]" select="0">
<a href=<<github-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<github-link-base>>/></a>
</$set>
</$set>
\procedure make-pr-maker-link()
<a href={{{ [<currentTiddler>encodeuricomponent[]addprefix[https://saqimtiaz.github.io/tw5-docs-pr-maker/#]] }}}
class="tc-tiddlylink-external"
target="_blank"
rel="noopener noreferrer"
>Link to "<$text text=<<currentTiddler>>/>" in Docs PR Maker edition</a>
\end
<$list filter="[all[current]!is[system]!is[shadow]]">
@ -30,8 +50,9 @@ A static HTML representation of this tiddler is available at the URL:
* <<make-static-link>>
Help us to improve the documentation by sending a ~GitHub pull request for this tiddler:
Help us to [[improve the documentation|Improving TiddlyWiki Documentation]] by suggesting changes to this tiddler using the [[TiddlyWiki Docs PR Maker]] or directly on ~GitHub.
* <<make-pr-maker-link>>
* <<make-github-link>>
</$list>

View File

@ -1,81 +1,100 @@
code-body: yes
created: 20150117152607000
modified: 20230325141733992
modified: 20240317091700545
tags: $:/tags/Macro
title: $:/editions/tw5.com/doc-macros
type: text/vnd.tiddlywiki
\define .concat(1,2,3,4,5) $1$$2$$3$$4$$5$
\whitespace trim
\define .def(_) <dfn class="doc-def">$_$</dfn>
\define .em(_) <em class="doc-em">$_$</em>
\define .strong(_) <strong class="doc-strong">$_$</strong>
\define .place(_) <code class="doc-place">$_$</code>
\define .word(_) "$_$"
\function .concat(1,2,3,4,5) [[$(1)$$(2)$$(3)$$(4)$$(5)$]substitute[]]
\function .word(_) [["]] [<_>] =[["]] +[join[]]
\define .preamble(_) :.doc-preamble $_$
\define .note(_)
@@.doc-note
;Note
: $_$
@@
\procedure .def(_) <dfn class="doc-def"><<_>></dfn>
\procedure .em(_) <em class="doc-em"><<_>></em>
\procedure .strong(_) <strong class="doc-strong"><<_>></strong>
\procedure .place(_) <code class="doc-place"><<_>></code>
\procedure .preamble(_) <dl><dd class="doc-preamble"><<_>></dd></dl>
\procedure .tid(_) <code class="doc-tiddler"><<_>></code>
\procedure .tag(_) <code class="doc-tag"><<_>></code>
\procedure .field(_) <code class="doc-field"><<_>></code>
\procedure .value(_) <code class="doc-value"><<_>></code>
\procedure .op(_) <code class="doc-operator"><<_>></code>
\procedure .var(_) <code class="doc-var"><<_>></code>
\procedure .wid(_) <code class="doc-widget"><$macrocall $name=".concat" 1="$" 2=<<_>>/></code>
\procedure .attr(_) <code class="doc-attr"><<_>></code>
\procedure .param(_) <code class="doc-param"><<_>></code>
\procedure .tiddler-fields(tiddler)
<$tiddler tiddler=<<tiddler>>>
<div class="doc-tiddler-fields">
<h2>
<$link>
<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/>
</$link>
</h2>
<table class="tc-view-field-table">
<tbody>
<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
</tbody>
</table>
</div>
</$tiddler>
\end
\define .tid(_) <code class="doc-tiddler">$_$</code>
\define .tag(_) <code class="doc-tag">$_$</code>
\define .field(_) <code class="doc-field">$_$</code>
\define .value(_) <code class="doc-value">$_$</code>
\define .op(_) <code class="doc-operator">$_$</code>
\define .var(_) <code class="doc-var">$_$</code>
\define .wid(_) <code class="doc-widget">$$_$</code>
\define .attr(_) <code class="doc-attr">$_$</code>
\define .param(_) <code class="doc-param">$_$</code>
\function .mtitle(_) [<_>] Macro +[join[ ]]
\function .otitle(_) [<_>] Operator +[join[ ]]
\function .vtitle(_) [<_>] Variable +[join[ ]]
\define .mtitle(_) $_$ Macro
\define .otitle(_) $_$ Operator
\define .vtitle(_) $_$ Variable
\procedure .link(_,to) <$link to=<<to>> ><<_>></$link>
\procedure .clink(_,to) <span class="doc-clink"><$link to=<<to>>><<_>></$link></span>
\define .link(_,to) <$link to="$to$">$_$</$link>
\define .clink(_,to) <span class="doc-clink"><<.link """$_$""" "$to$">></span>
\define .dlink(_,to) <$macrocall $name=".link" _=<<.def "$_$">> to="$to$">/>
\define .dlink-ex(_,to) <a href="$to$" class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><<.def "$_$">></a>
\define .flink(to) <$macrocall $name=".link" _=<<.field {{$to$!!caption}}>> to="$to$"/>
\define .mlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.mtitle "$_$">>/>
\define .mlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/>
\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/>
\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/>
\define .vlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.vtitle "$_$">>/>
\define .vlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/>
\define .wlink(to) <$macrocall $name=".link" _=<<.wid {{$to$!!caption}}>> to="$to$"/>
\define .wlink2(_,to) <$macrocall $name=".link" _="$_$" to="$to$"/>
\procedure .dlink(_,to) <$link to=<<to>>><$macrocall $name=".def" _=<<_>>/></$link>
\define .key(_) <span class="doc-key">$_$</span>
\define .combokey(_) <$macrocall $name=".if" cond="$_$" then=<<.key '$_$'>>/>
\define .keycombo(1,2,3,4) <<.combokey "$1$">><<.if "$2$" +>><<.combokey "$2$">><<.if "$3$" +>><<.combokey "$3$">><<.if "$4$" +>><<.combokey "$4$">>
\procedure .dlink-ex(_,to) <a href=<<to>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$macrocall $name=".def" _=<<_>>/></a>
\procedure .flink(to) <$macrocall $name=".link" _=`<<.field {{$(to)$!!caption}}>>` to=<<to>>/>
\define .tab(_) <span class="doc-tab">{{$_$!!caption}}</span>
\define .sidebar-tab(_) <<.tab "$:/core/ui/SideBar/$_$">>
\define .more-tab(_) <<.tab "$:/core/ui/MoreSideBar/$_$">>
\define .info-tab(_) <<.tab "$:/core/ui/TiddlerInfo/$_$">>
\define .controlpanel-tab(_) <<.tab "$:/core/ui/ControlPanel/$_$">>
\define .advancedsearch-tab(_) <<.tab "$:/core/ui/AdvancedSearch/$_$">>
\define .toc-tab() <<.tab "TableOfContents">>
\define .example-tab(_) <span class="doc-tab">$_$</span>
\procedure .mlink(_) <$link to={{{ [.mtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link>
\procedure .mlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/> </$link>
\define .doc-tabs()
\procedure .olink(_) <$link to={{{ [.otitle<_>] }}}><$macrocall $name=".op" _=<<_>>/> </$link>
\procedure .olink2(_,to) <$link to={{{ [.otitle<to>] }}}><$macrocall $name=".op" _=<<_>>/> </$link>
\procedure .vlink(_) <$link to={{{ [.vtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link>
\procedure .vlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/></$link>
\procedure .wlink(to) <$link to=<<to>> > <$macrocall $name=".wid" _={{{ [<to>get[caption]] }}}> </$link>
\procedure .wlink2(_,to) <$link to=<<to>> ><<_>></$link>
\procedure .key(_) <span class="doc-key"><<_>></span>
\procedure .keys(_) <span class="doc-key"><<_>></span>
\procedure .tab(_) <span class="doc-tab"><$transclude $tiddler=<<_>> $field=caption ><<_>></$transclude></span>
\procedure .sidebar-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/SideBar/$(_)$`/>
\procedure .more-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/MoreSideBar/$(_)$`/>
\procedure .info-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/TiddlerInfo/$(_)$`/>
\procedure .controlpanel-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/ControlPanel/$(_)$`/>
\procedure .advancedsearch-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/AdvancedSearch/$(_)$`/>
\procedure .toc-tab() <$macrocall $name=".tab" _="TableOfContents"/>
\procedure .example-tab(_) <span class="doc-tab"><<_>></span>
\procedure .doc-tabs()
<$macrocall $name="tabs"
tabsList="[tag<currentTiddler>description[tab]]"
default={{{ [tag<currentTiddler>first[]] }}}
explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} />
tabsList="[tag<currentTiddler>description[tab]]"
default={{{ [tag<currentTiddler>first[]] }}}
explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} />
\end
\define .doc-tab-link(text, target, tooltip:"", class:"")
\procedure .doc-tab-link(text, target, tooltip:"", class:"")
<!-- figure out where the addressed doc-tabs are -->
<$tiddler tiddler={{{ [<currentTiddler>search:text[.doc-tabs]] :else[<currentTiddler>tags[]search:text[.doc-tabs]first[]] :else[<currentTiddler>] }}} >
<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<__class__>] +[join[ ]] }}}
set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
setTo=<<__target__>>
tooltip=<<__tooltip__>>>
<<__text__>>
<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<class>] +[join[ ]] }}}
set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
setTo=<<target>>
tooltip=<<tooltip>>>
<<text>>
<!-- if tiddler with tabs is open, scroll to tabs, otherwise open that tiddler (relevant from within tab subtiddlers) -->
<$list filter="[[$:/StoryList]contains<currentTiddler>]" variable="ignore" emptyMessage="<$action-navigate />">
<$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]addprefix[.doc-tabs-]] }}} />
@ -84,136 +103,128 @@ type: text/vnd.tiddlywiki
</$button>
</$tiddler>
\end
\define .widget-attr-link(text, target)
\procedure .widget-attr-link(text, target)
<$macrocall $name=".doc-tab-link"
text={{{ [[<code class="doc-attr">]] [<__text__>] [[</code>]] +[join[]] }}}
class="doc-tab-link"
target=<<__target__>>
tooltip={{{ [[Show more information about the ']] [<__text__>] [[' attribute]] +[join[]] }}} />
text={{{ [[<code class="doc-attr">]] [<text>] [[</code>]] +[join[]] }}}
class="doc-tab-link"
target=<<target>>
tooltip={{{ [[Show more information about the ']] [<text>] [[' attribute]] +[join[]] }}} />
\end
\define .button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span>
\procedure .button(_) <span class="doc-button"><$transclude $tiddler=`$:/core/ui/Buttons/$(_)$` $field="caption" ><<_>></$transclude></span>
\define .icon(_) <span class="doc-icon">{{$_$}}</span>
\procedure .icon(_) <span class="doc-icon"><$transclude $tiddler=<<_>>/></span>
\define .tip(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/tip}}</div> $_$</div>
\define .warning(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/warning}}</div> $_$</div>
\procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem")
\function _f.tipClass() [[doc-icon-block]] [<class>!is[blank]then<class>] +[join[ ]]
<div class=<<_f.tipClass>>>
<%if [<title>!is[blank]] %><div>''<<title>>''</div><% endif %>
<div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div>
<<text>>
</div>
\end
\define .state-prefix() $:/state/editions/tw5.com/
\procedure .note(_:"", title:"Note", icon:"$:/core/images/info-button", class:"doc-note", iconSize:"22pt")
<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/>
\end
\define .lorem()
\procedure .tip(_:"", title:"Tip" , icon:"$:/core/images/tip", class:"doc-tip", iconSize:"22pt")
<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/>
\end
\procedure .warning(_:"", title:"Warning", icon:"$:/core/images/warning", class:"doc-warning", iconSize:"22pt")
<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/>
\end
\procedure .state-prefix() $:/state/editions/tw5.com/
\procedure .lorem()
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end
\define .toc-lorem()
\procedure .toc-lorem()
This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
<<.lorem>>
\end
\define .example(n,eg,egvar:NO-SUCH-VAR)
\procedure .example(n,eg,egvar)
<$let eg={{{ [<egvar>!is[blank]getvariable[]] :else[<eg>] }}}>
<div class="doc-example">
<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR">
<$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/>
<$codeblock code="""$eg$"""/>
</$reveal>
<$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR">
<!-- allow an example to contain """ -->
<$macrocall $name="copy-to-clipboard-above-right" src=<<$egvar$>>/>
<$codeblock code=<<$egvar$>>/>
</$reveal>
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show">
<dl>
<dd><$button set=<<.state>> setTo="show">Try it</$button></dd>
</dl>
</$reveal>
<$reveal state=<<.state>> type="match" text="show">
<dl>
<dd><$button set=<<.state>> setTo="">Hide</$button></dd>
</dl>
<blockquote class="doc-example-result">
<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR">
$$$text/vnd.tiddlywiki
$eg$
$$$
</$reveal>
<$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR">
<<$egvar$>>
</$reveal>
</blockquote>
</$reveal>
</$list>
<$macrocall $name="copy-to-clipboard-above-right" src=<<eg>>/>
<$codeblock code=<<eg>>/>
<$list filter=`[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$(n)$]]` variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show">
<dl>
<dd><$button set=<<.state>> setTo="show">Try it</$button></dd>
</dl>
</$reveal>
<$reveal state=<<.state>> type="match" text="show">
<dl>
<dd><$button set=<<.state>> setTo="">Hide</$button></dd>
</dl>
<blockquote class="doc-example-result">
<$transclude $variable="eg" $mode="block"/>
</blockquote>
</$reveal>
</$list>
</div>
</$let>
\end
\define .bad-example(eg)
\procedure .bad-example(eg)
<table class="doc-bad-example">
<tbody>
<tr class="evenRow">
<td><span style="font-size:1.5em;">&#9888;</span> Warning:<br> Don't do it this way!</td>
<td>
$eg$
</td>
</tr>
</tbody>
<tbody>
<tr class="evenRow">
<td>
<span class="tc-small-gap-right" style="font-size:1.5em;">&#9888;</span>
Warning:<br> Don't do it this way!
</td>
<td>
<$transclude $variable="eg" $mode="block"/>
</td>
</tr>
</tbody>
</table>
\end
\define .link-badge(text,link,colour)
<a href=<<__link__>> class="doc-link-badge" style="background-color:$colour$;" target="_blank" rel="noopener noreferrer"><$text text=<<__text__>>/></a>
\procedure .link-badge(text,link,colour)
<a href=<<link>> class="doc-link-badge" style.background-color=<<colour>> target="_blank" rel="noopener noreferrer">
<$text text=<<text>>/>
</a>
\end
<!-- TODO use $:/palette colour settings -->
\procedure .link-badge-added(link,colour:#ffe246) <$macrocall $name=".link-badge" text="added" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-addendum(link,colour:#fcc84a) <$macrocall $name=".link-badge" text="addendum" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-extended(link,colour:#f9a344) <$macrocall $name=".link-badge" text="extended" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-fixed(link,colour:#ffa86d) <$macrocall $name=".link-badge" text="fixed" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-here(link,colour:#d88e63) <$macrocall $name=".link-badge" text="here" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-hide(link,colour:#9d959f) <$macrocall $name=".link-badge" text="hide" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-improved(link,colour:#7593c7) <$macrocall $name=".link-badge" text="improved" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-modified(link,colour:#7f99c9) <$macrocall $name=".link-badge" text="modified" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-removed(link,colour:#a9aabc) <$macrocall $name=".link-badge" text="removed" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-renamed(link,colour:#b4b995) <$macrocall $name=".link-badge" text="renamed" link=<<link>> colour=<<colour>>/>
\procedure .link-badge-updated(link,colour:#91ba66) <$macrocall $name=".link-badge" text="updated" link=<<link>> colour=<<colour>>/>
\define .link-badge-added(link,colour:#ffe246) <<.link-badge "added" """$link$""" """$colour$""">>
\define .link-badge-addendum(link,colour:#fcc84a) <<.link-badge "addendum" """$link$""" """$colour$""">>
\define .link-badge-extended(link,colour:#f9a344) <<.link-badge "extended" """$link$""" """$colour$""">>
\define .link-badge-fixed(link,colour:#ffa86d) <<.link-badge "fixed" """$link$""" """$colour$""">>
\define .link-badge-here(link,colour:#d88e63) <<.link-badge "here" """$link$""" """$colour$""">>
\define .link-badge-hide(link,colour:#9d959f) <<.link-badge "hide" """$link$""" """$colour$""">>
\define .link-badge-improved(link,colour:#7593c7) <<.link-badge "improved" """$link$""" """$colour$""">>
\define .link-badge-modified(link,colour:#7f99c9) <<.link-badge "modified" """$link$""" """$colour$""">>
\define .link-badge-removed(link,colour:#a9aabc) <<.link-badge "removed" """$link$""" """$colour$""">>
\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">>
\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">>
\define .tiddler-fields(tiddler)
<$tiddler tiddler=<<__tiddler__>>>
<div class="doc-tiddler-fields">
<h2>
<$link>
<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/>
</$link>
</h2>
<table class="tc-view-field-table">
<tbody>
<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
</tbody>
</table>
</div>
</$tiddler>
\procedure .banner-credits(credit,url)
<img src=<<url>> width="140" style="float:left;margin-right:0.5em;"/>
<<credit>>
<div style="clear:both;"/>
\end
\define .banner-credits(credit,url)
<img src=<<__url__>> width="140" style="float:left;margin-right:0.5em;"/>
$credit$
<div style="clear:both;">
</div>
\end
\define .contributors(usernames)
\procedure .contributors(usernames)
<ol class="doc-github-contributors">
<$list filter="[enlist<__usernames__>sort[]]" variable="username">
<li>
<a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/><span class="doc-github-contributor-username">@<$text text=<<username>>/></span></a>
</li>
</$list>
<$list filter="[enlist<usernames>sort[]]" variable="username">
<li>
<a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer">
<img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/>
<span class="doc-github-contributor-username">
@<$text text=<<username>>/>
</span>
</a>
</li>
</$list>
</ol>
\end
<pre><$view field="text"/></pre>

View File

@ -1,3 +1,4 @@
code-body: yes
created: 20150117152612000
modified: 20240223123123497
tags: $:/tags/Stylesheet
@ -31,6 +32,7 @@ type: text/vnd.tiddlywiki
color: <<color very-muted-foreground>>;
font-style: normal;
font-weight: bold;
padding: 0;
}
.doc-button,
@ -85,7 +87,6 @@ td svg {
.doc-preamble {
border: 2px solid <<colour code-border>>;
color: <<colour very-muted-foreground>>;
font-size: 90%;
margin-left: 0;
padding: 0.5em 0.7em;
}
@ -112,7 +113,7 @@ td svg {
}
.doc-example input[type=search] {
width: 95%;
width: 95%;
}
.doc-example pre:first-child {
margin-top: 0;
@ -138,7 +139,7 @@ td svg {
}
.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
background-color:#ffff80;
background-color:#ffff80;
}
.doc-table th, .doc-table tr {
@ -164,19 +165,37 @@ tr.doc-table-subheading {
}
.doc-icon-block {
border-left: 2px solid <<colour code-border>>;
margin-left: 3em;
border-left: 4px solid <<colour blockquote-bar>>;
margin: 15px 0 15px 3em;
padding-left: 0.6em;
position: relative;
}
.doc-block-icon {
position: absolute;
left: -3em;
top: 0.2em;
}
.doc-icon-block.doc-note {
border-left: 4px solid <<colour blockquote-bar>>;
background: <<colour blockquote-bar>>11;
}
.doc-icon-block.doc-tip {
border-left: 4px solid <<colour primary>>;
background: <<colour primary>>11;
}
.doc-icon-block.doc-warning {
border-left: 4px solid <<colour alert-highlight>>;
background: <<colour alert-highlight>>11;
}
.doc-block-icon .tc-image-tip {
fill: <<colour primary>>;
}
.doc-block-icon .tc-image-warning {
fill: <<colour alert-highlight>>;
}
@ -246,7 +265,6 @@ a.doc-deprecated-version.tc-tiddlylink {
height: 1em;
}
.doc-tiddler-fields table,
.doc-tiddler-fields h2 {
margin: 0.5em 0;
@ -299,13 +317,13 @@ ol.doc-github-contributors li {
color: #666;
}
.doc-tabs.tc-tab-buttons button {
font-size: 1rem;
padding: 0.5em;
font-size: 1rem;
padding: 0.5em;
}
.doc-tabs button .doc-attr {
background-color: unset;
color: #666;
background-color: unset;
color: #666;
}
.doc-tab-link .doc-attr {
color: unset;
color: unset;
}

View File

@ -1,10 +1,10 @@
title: $:/editions/tw5.com/download-empty
code-body: yes
\define saveTiddlerFilter()
\procedure saveTiddlerFilter()
[[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]
\end
\define savingEmpty()
yes
\end
\procedure savingEmpty() yes
{{$:/core/templates/tiddlywiki5.html}}

View File

@ -1,27 +1,28 @@
code-body: yes
created: 20230316112235083
list-before: $:/core/ui/ViewTemplate/body
modified: 20230326145802667
modified: 20240229161432000
tags: $:/tags/ViewTemplate
title: $:/editions/tw5.com/filter-run-template
type: text/vnd.tiddlywiki
\define .op-place()
<$macrocall $name=".if"
cond="""$(op-name)$"""
then="<<.place '$(op-name)$'>> = "
else=""/>
\end
\define .op-row()
<$macrocall $name=".if"
cond="""$(op-body)$"""
then="""<tr><th align="left">$(op-head)$</th><td><<.op-place>>$(op-body)$</td></tr>"""
else=""/>
\end
\whitespace trim
\procedure .op-place()
<% if [<op-name>!is[blank]] %>
<$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span>
<% endif %>
\end
\procedure .op-row()
<% if [<op-body>!is[blank]] %>
<tr>
<th align="left"><<op-head>></th>
<td><<.op-place>><<op-body>></td>
</tr>
<% endif %>
\end
<$list filter="[all[current]tag[Named Filter Run Prefix]]">
<$let op-head="" op-body="" op-name="">
<table class="doc-table">

View File

@ -1,52 +1,66 @@
created: 20150117152607000
modified: 20230617183916622
modified: 20240229132501000
tags: $:/tags/Macro
code-body: yes
title: $:/editions/tw5.com/operator-macros
\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$</$link>
\whitespace trim
\procedure .operator-examples(op,text:"Examples") <$link to=`$(op)$ Operator (Examples)`><<text>></$link>
\procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<<eg>>/>
\procedure .operator-example(n,eg,ie)
<div class="doc-example">
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show">
<code><$text text=<<eg>>/></code>
<$macrocall $name=".if" cond=<<ie>> then={{{[[<dd>&rarr; ]addsuffix<ie>addsuffix[</dd>]]}}}/>
<dl>
<dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd>
</dl>
</$reveal>
<$reveal state=<<.state>> type="match" text="show">
<$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/>
<dl>
<dd>
<$button set=<<.state>> setTo="">Hide</$button>
<$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<eg>>>
<$button actions=<<.operator-example-tryit-actions>>>Reset</$button>
</$reveal>
</dd>
</dl>
<blockquote class="doc-example-result">
<ul><$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)">
<li><$link><$view field="title"/></$link></li>
</$list></ul>
</blockquote>
</$reveal>
</$list>
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix<n>]" variable=".state">
<$reveal state=<<.state>> type="nomatch" text="show">
<code><$text text=<<eg>>/></code>
<% if [<ie>!is[blank]] %>
<dd>&rarr;&nbsp;<<ie>></dd>
<% endif %>
<dl>
<dd><$button actions=<<.operator-example-tryit-actions>>>Try it</$button></dd>
</dl>
</$reveal>
<$reveal state=<<.state>> type="match" text="show">
<$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/>
<dl>
<dd>
<$button set=<<.state>> setTo="">Hide</$button>
<$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<<eg>>>
<$button actions=<<.operator-example-tryit-actions>>>Reset</$button>
</$reveal>
</dd>
</dl>
<blockquote class="doc-example-result">
<ul>
<$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)">
<li><$link><$view field="title"/></$link></li>
</$list>
</ul>
</blockquote>
</$reveal>
</$list>
</div>
\end
\define .inline-operator-example(eg)
<code><$text text=<<__eg__>>/></code> evaluates to <$list filter=<<__eg__>> emptyMessage="(empty)"> <code><$text text=<<currentTiddler>>/></code> </$list>
\procedure .inline-operator-example(eg)
<code>
<$text text=<<eg>>/>
</code>
<span class="tc-tiny-gap">evaluates to</span>
<$list filter=<<eg>> emptyMessage="(empty)">
<code class="tc-tiny-gap-left"><$text text=<<currentTiddler>>/></code>
</$list>
\end
\define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]].
\define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler.
\define .s-matching-is-case-sensitive() In looking for matches for <<.place S>>, capital and lowercase letters are treated as different.
\define .node-only-operator()
\procedure .node-only-operator()
<$macrocall $name=".note" _="This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser."/>
\end
<pre><$view field="text"/></pre>

View File

@ -1,26 +1,26 @@
created: 20150203173506000
modified: 20240229155612000
list-before: $:/core/ui/ViewTemplate/body
modified: 20230602181119360
tags: $:/tags/ViewTemplate
code-body: yes
title: $:/editions/tw5.com/operator-template
\define .op-place()
<$macrocall $name=".if"
cond="""$(op-name)$"""
then="<<.place '$(op-name)$'>> = "
else=""/>
\end
\define .op-row()
<$macrocall $name=".if"
cond="""$(op-body)$"""
then="""<tr><th align="left">$(op-head)$</th><td><<.op-place>>$(op-body)$</td></tr>"""
else=""/>
\end
\whitespace trim
\procedure .op-place()
<% if [<op-name>!is[blank]] %>
<$macrocall $name=".place" _=<<op-name>> /><span class="tc-tiny-gap">=</span>
<% endif %>
\end
\procedure .op-row()
<% if [<op-body>!is[blank]] %>
<tr>
<th align="left"><<op-head>></th><td><<.op-place>><<op-body>></td>
</tr>
<% endif %>
\end
<$list filter="[all[current]tag[Filter Operators]]">
<$let op-head="" op-body="" op-name="">
<table class="doc-table before-tiddler-body">

View File

@ -1,21 +1,26 @@
created: 20150228114241000
modified: 20220227210136243
tags: $:/tags/Macro
code-body: yes
title: $:/editions/tw5.com/variable-macros
\define .variable-examples(v,text:"Examples") <$link to="$v$ Variable (Examples)">$text$</$link>
\define .macro-examples(m,text:"Examples") <$link to="$m$ Macro (Examples)">$text$</$link>
\define .widget-examples(w,text:"Examples") <$link to="$w$ Widget (Examples)">$text$</$link>
\procedure .variable-examples(v,text:"Examples") <$link to=`$(v)$ Variable (Examples)`><<text>></$link>
\procedure .macro-examples(m,text:"Examples") <$link to=`$(m)$ Macro (Examples)`><<text>></$link>
\procedure .widget-examples(w,text:"Examples") <$link to=`$(w)$ Widget (Examples)`><<text>></$link>
\define .js-macro-link(_) [[$_$|https://tiddlywiki.com/dev/index.html#JavaScript%20Macros]]
\define .this-is-static-link-variable() <<.tip "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">>
\define .this-is-toolbar-config-variable(configTiddler)
It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button.
The standard page template sets it to the value found in [[$configTiddler$]], with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]].
\procedure .js-macro-link(_)
<a href="https://tiddlywiki.com/dev/index.html#JavaScript%20Macros"
class="tc-tiddlylink-external"
target="_blank"
rel="noopener noreferrer"
><$text text=<<_>>/></a>
\end
<pre><$view field="text"/></pre>
\procedure .this-is-static-link-variable() <<.note "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">>
\procedure .this-is-toolbar-config-variable(configTiddler)
\whitespace notrim
It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button.
The standard page template sets it to the value found in <$link to=<<configTiddler>>><<configTiddler>></$link>, with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]].
\end

View File

@ -1,21 +1,38 @@
code-body: yes
created: 20161008085627406
modified: 20231206135257498
modified: 20240229155633000
tags: $:/tags/Macro
title: $:/editions/tw5.com/version-macros
type: text/vnd.tiddlywiki
\procedure .from-version-reference() 5.3.0
\whitespace trim
\function tf.from-version-reference() 5.3.0
\procedure .from-version-template(class, text)
<$link to={{{ [<version>addprefix[Release ]] }}} class=<<class>> >@@.tc-tiny-gap-right {{$:/core/images/info-button}}@@<<text>><<version>></$link>
<$link to={{{ [<version>addprefix[Release ]] }}} class=<<class>> >
<span class="tc-tiny-gap-right">
{{$:/core/images/info-button}}
</span>
<<text>><<version>>
</$link>
\end
\procedure .from-version(version)
<$list filter="[<version>compare:version:gteq<.from-version-reference>]"><<.from-version-template "doc-from-version doc-from-version-new" "New in v">></$list>
<$list filter="[<version>compare:version:lt<.from-version-reference>]"><<.from-version-template "doc-from-version" "Introduced in v">></$list>
<% if [<version>compare:version:gteq<tf.from-version-reference>] %>
<<.from-version-template "doc-from-version doc-from-version-new" "New in v">>
<% else %>
<<.from-version-template "doc-from-version" "Introduced in v">>
<% endif %>
\end
\define .deprecated-since(version, superseded:"TODO-Link")
<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated since: <$text text=<<__version__>>/></$link> (see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/></$link>)
\procedure .deprecated-since(version, superseded:"TODO-Link")
<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">
{{$:/core/images/warning}}
<span class="tc-tiny-gap">Deprecated since:</span>
<$text text=<<version>>/>
</$link>
<span class="tc-tiny-gap-left">
(see <$link class="tc-tiny-gap-left" to=<<superseded>>><$text text=<<superseded>>/></$link>)
</span>
\end

View File

@ -1,104 +1,96 @@
code-body: yes
created: 20150117184156000
modified: 20220617122915793
modified: 20240315144208842
tags: $:/tags/Macro
title: $:/editions/tw5.com/wikitext-macros
type: text/vnd.tiddlywiki
\define activatePluginTab()
\whitespace trim
\procedure activatePluginTab()
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
<$action-navigate $to="$:/ControlPanel"/>
\end
\define activateTiddlerWindow()
<$action-sendmessage $message="tm-open-window"
$param=<<currentTiddler>> windowTitle="Side by Side View"
width="800" height="600" />
\procedure activateTiddlerWindow()
<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> windowTitle="Side by Side View" width="800" height="600" />
\end
\define controlPanel-plugin-link()
\procedure controlPanel-plugin-link()
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/options-button}} ~ControlPanel
{{$:/core/images/options-button}} ~ControlPanel
</$button>
\end
\define open-tiddler-in-window()
\procedure open-tiddler-in-window()
\whitespace notrim
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
open ''this'' tiddler in a new window
open ''this'' tiddler in a new window
</$button>
\end
\define activateEditionWindow(url)
<$action-sendmessage $message="tm-open-external-window"
$param="""$url$""" windowName="_edition"
windowFeatures="width=800 height=600" />
\procedure activateEditionWindow(url)
<$action-sendmessage $message="tm-open-external-window" $param=<<url>> windowName="_edition" windowFeatures="width=800 height=600" />
\end
\define open-external-window(url)
<$button actions=<<activateEditionWindow """$url$""">> class="tc-btn-invisible tc-tiddlylink">
open the ''example edition'' in a new window
\procedure open-external-window(url)
\whitespace notrim
<$button actions=<<activateEditionWindow <<url>> class="tc-btn-invisible tc-tiddlylink">
open the ''example edition'' in a new window
</$button>
\end
\define wikitext-example(src)
\procedure wikitext-example(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
<$codeblock code=<<__src__>>/>
That renders as:
<$macrocall $name="__src__"/>
... and the underlying HTML is:
<$wikify name="html" text=<<__src__>> output="html">
<$codeblock code=<<html>>/>
</$wikify>
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
<$codeblock code=<<src>>/>
<p>
That renders as:
</p>
<$transclude $variable="src" $mode="block"/>
<p>
... and the underlying HTML is:
</p>
<$wikify name="html" text=<<src>> output="html">
<$codeblock code=<<html>>/>
</$wikify>
</div>
\end
\define wikitext-example-without-html(src)
\procedure wikitext-example-without-html(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/>
<$codeblock code=<<__src__>>/>
That renders as:
<$macrocall $name="__src__"/>
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
<$codeblock code=<<src>>/>
<p>
That renders as:
</p>
<$transclude $variable="src" $mode="block"/>
</div>
\end
\define wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
\procedure wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
\define wikitext-example-table-row(id, code)
<tr>
<th><<__id__>></th><td><$codeblock code=<<__code__>>/></td><td>
<<__code__>>
</td>
\procedure wikitext-example-table-row(id, code)
<tr>
<th><<id>></th>
<td><$codeblock code=<<code>>/></td>
<td><<code>></td>
</tr>
\end
\define tw-code(tiddler)
\procedure tw-code(tiddler)
<$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/>
\end
\define tw-code-link(tiddler)
\procedure tw-code-link(tiddler)
[[$tiddler$]]:
<<tw-code $tiddler$>>
\end
\define flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link")
\whitespace trim
<$link class={{{ [<__class__>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<__linkField__>else<currentTiddler>] }}}>
<div class="tc-card-accent" style.borderTop={{{ [<__bordercolor__>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<__backgroundcolor__>> style.color=<<__textcolor__>> style.fill=<<__textcolor__>>>
\procedure flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link")
<$link class={{{ [<class>addprefix[tc-card ]] }}} to={{{ [<currentTiddler>get<linkField>else<currentTiddler>] }}}>
<div class="tc-card-accent" style.borderTop={{{ [<bordercolor>!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<backgroundcolor>> style.color=<<textcolor>> style.fill=<<textcolor>>>
<$list filter="[<currentTiddler>has[ribbon-text]]" variable="ignore">
<div class="tc-card-ribbon-wrapper">
<div class="tc-card-ribbon" style.backgroundColor={{{ [<currentTiddler>get[ribbon-color]else[red]] }}}>
@ -108,21 +100,21 @@ That renders as:
</div>
</div>
</$list>
<$list filter="[<currentTiddler>has<__imageField__>]" variable="ignore">
<$list filter="[<currentTiddler>has<imageField>]" variable="ignore">
<div class="tc-card-image">
<$image source={{{ [<currentTiddler>get<__imageField__>] }}}/>
<$image source={{{ [<currentTiddler>get<imageField>] }}}/>
</div>
</$list>
<div class="tc-card-title"><$transclude field=<<__captionField__>>><$view field="title"/></$transclude></div>
<$list filter="[<__subtitle__>!is[blank]]" variable="ignore">
<div class="tc-card-title"><$transclude field=<<captionField>>><$view field="title"/></$transclude></div>
<$list filter="[<subtitle>!is[blank]]" variable="ignore">
<div class="tc-card-subtitle">
<$text text=<<__subtitle__>>/>
<$text text=<<subtitle>>/>
</div>
</$list>
<div class="tc-card-icon"><$transclude tiddler={{!!icon}}/></div>
<div class="tc-card-body-wrapper">
<div class="tc-card-body">
<$transclude field=<<__descriptionField__>> mode="block"/>
<$transclude field=<<descriptionField>> mode="block"/>
</div>
<div class="tc-card-body-clear">
</div>

View File

@ -6,11 +6,12 @@ type: text/vnd.tiddlywiki
!! Introduction
A <<.def variable>> is a snippet of text that can be accessed by name. The text is referred to as the variable's <<.def value>>.
* A <<.def variable>> is a ''snippet of text'' that can be accessed by name.
* The text is referred to as the variable's <<.def value>>.
Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink SetWidget>>, <<.wlink LetWidget>> and <<.wlink ListWidget>> widgets.
Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink LetWidget>>, <<.wlink SetWidget>> and <<.wlink ListWidget>> widgets.
The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable "currentTiddler" is set to the title of the tiddler.
The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable <<.var currentTiddler>> is set to the title of the tiddler.
Variables can also be overwritten by descendent widgets defining variables of the same name, thus binding a different snippet to that name for the scope of the children of the widget.

View File

@ -1,11 +1,17 @@
created: 20150228124038000
modified: 20240310134432122
tags: [[tv-get-export-image-link Variable]] [[Variable Examples]]
title: tv-get-export-image-link Variable (Examples)
type: text/vnd.tiddlywiki
This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]]:
This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]]
<$importvariables filter="$:/editions/tw5.com/macro-examples/tv-get-export-image-link">
<$codeblock code={{$:/editions/tw5.com/macro-examples/tv-get-export-image-link}}/>
<$macrocall $name=".example" n="1" eg="""[img[favicon.ico]]"""/>
</$importvariables>
Also see:
* [[substitute Operator]]
* [[Substituted Attribute Values]]

View File

@ -7,8 +7,6 @@ type: text/vnd.tiddlywiki
<<.from-version "5.1.15">> The <<.def tv-filter-export-link>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. If defined, it takes precedence over the [[tv-wikilink-template Variable]].
<<.this-is-static-link-variable>>
The variable is treated as a filter that is given the target tiddler title as input. The filter is evaluated and the first result is used as the `href` attribute.
For example:
@ -18,3 +16,5 @@ For example:
```
See also the <<.vlink tv-get-export-link>> variable, which dominates over this one.
<<.this-is-static-link-variable>>

View File

@ -1,13 +1,13 @@
created: 20150228122257000
modified: 20150228130940000
title: tv-get-export-image-link Variable
tags: Variables [[Core Variables]] [[Configuration Variables]]
type: text/vnd.tiddlywiki
caption: tv-get-export-image-link
created: 20150228122257000
modified: 20240310133708578
tags: Variables [[Core Variables]] [[Configuration Variables]]
title: tv-get-export-image-link Variable
type: text/vnd.tiddlywiki
The <<.def tv-get-export-image-link>> [[variable|Variables]] controls the value of the `src` attribute on the HTML `img` element generated by the <<.wlink ImageWidget>> widget when the value of its `source` attribute is not the title of a tiddler.
The variable should be a [[macro|Macros]] with the following parameter:
The variable should be a [[function|Functions]] with the following parameter:
;src
: The value of the `source` attribute -- equivalent to the image name specified in <$link to="Images in WikiText">the shorthand syntax</$link> `[img[source]]`

View File

@ -1,17 +1,17 @@
caption: tv-get-export-link
created: 20150228114004000
modified: 20150228130943000
title: tv-get-export-link Variable
tags: Variables [[Core Variables]] [[Configuration Variables]]
title: tv-get-export-link Variable
type: text/vnd.tiddlywiki
caption: tv-get-export-link
The <<.def tv-get-export-link>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget.
<<.this-is-static-link-variable>>
The variable should be a [[macro|Macros]] with the following parameter:
;to
: The title of the target tiddler of the link, with no escaping
See also <<.vlink tv-wikilink-template>>. If both that variable and this one exist, this one dominates.
<<.this-is-static-link-variable>>

View File

@ -7,8 +7,6 @@ type: text/vnd.tiddlywiki
The <<.def tv-wikilink-template>> [[variable|Variables]] controls the value of the `href` attribute on the HTML `a` element generated by the <<.wlink LinkWidget>> widget. The <<.vlink tv-filter-export-link>>, if defined, it takes precedence over the <<.vlink tv-wikilink-template>> variable.
<<.this-is-static-link-variable>>
The variable is treated as if it was a [[macro|Macros]] with the following parameters:
;uri_encoded
@ -21,3 +19,5 @@ The variable is treated as if it was a [[macro|Macros]] with the following param
The variable defaults to `#$uri_encoded$`.
See also the <<.vlink tv-get-export-link>> variable, which dominates over this one.
<<.this-is-static-link-variable>>

View File

@ -1,5 +1,5 @@
created: 20180905075846391
modified: 20230319130830880
modified: 20240413045138914
tags: [[WebServer Guides]]
title: Using the external JavaScript template
type: text/vnd.tiddlywiki
@ -20,7 +20,7 @@ The remaining inefficiency when working in the client server configuration is th
! Using the external ~JavaScript template with the client-server configuration
The mechanism is activated by setting the [[root-tiddler|WebServer Parameter: root-tiddler]] parameter to `$:/core/save/all-external-js`. This template externalises ~TiddlyWiki's core ~JavaScript into a separate file. For example, the following command will start your server with caching enabled. It will transfer the wiki with two GET requests, and the core can be cached by the browser.
The mechanism is activated by setting the [[root-tiddler|WebServer Parameter: root-tiddler]] parameter to `$:/core/save/all-external-js`. This template externalises ~TiddlyWiki's core ~JavaScript into a separate file. For example, the following command will [[start your server with caching enabled|WebServer Parameter: use-browser-cache]]. It will transfer the wiki with two GET requests, and the core can be cached by the browser.
```
tiddlywiki YOUR_WIKI_FOLDER --listen 'root-tiddler=$:/core/save/all-external-js' use-browser-cache=yes

View File

@ -1,5 +1,5 @@
created: 20180703095630828
modified: 20180703100445719
modified: 20240413045124764
tags: [[WebServer Guides]]
title: Using the integrated static file server
type: text/vnd.tiddlywiki
@ -13,4 +13,19 @@ Static files can be referenced directly:
* `[ext[./files/a-big-document.pdf]]` - to make a link to a PDF
* `[img[./files/a-big-image.png]]` - to embed an image
Alternatively, the ''_canonical_uri'' field can be used to reference the files as [[external tiddlers|ExternalImages]].
Alternatively, the ''_canonical_uri'' field can be used to reference the files as [[external tiddlers|ExternalImages]].
If [[WebServer Parameter: use-browser-cache]] is used, these files will be cached by the client's browser to save on bandwidth. In this case, the `cache busting strategy` can be used to make sure the client always has the latest updated files.
<<<
https://javascript.plainenglish.io/what-is-cache-busting-55366b3ac022
!! Cache Busting
There are a couple different ways of changing the names of files so that they will load when they change. One way is to use version numbers and have them somewhere in the file name when loading. You could have a subdirectory for every version, `v1/index.js` `v2/index.css` . You could also have the version in queries in the URLs, `index.js?v1` , `index.css?v2` .
Another way is to change the name of the file, `index.v1.js` , `index.v2.css` . These ways are not as manageable because this can become very hard once you have a ton of files that are being changed.
A more popular and manageable way is to keep hashes inside the file names. Hashes, if you dont know, are fixed length character representations of any content and they are irreversible, meaning you can get the hash from the file but you cant get the file from the hash. Hashes are perfect for this, because when a file changes its hash will change, so if we keep the hash inside the filename `index.[someHashHere].js` browsers will detect it and load it instead of an old file.
<<<

View File

@ -8,6 +8,11 @@ Header authentication is a web integration technique enabling external entities
Header authentication is activated if is configured via the [[authenticated-user-header|WebServer Parameter: authenticated-user-header]]
!! 3rd Party Projects That Support This Mechanism
Pomerium, and open-source proxy, has [[a guide|https://www.pomerium.com/docs/guides/tiddlywiki]] for adding authentication and authorization to a TiddlyWiki instance.
!! Usage in SSO
Header authentication is commonly used for "single sign on" in corporate environments. When doing header authentication, the user is not prompted for a username and password on TiddlyWiki. Instead, the user is required to login at a SSO proxy server. When the user authenticates themselves to the SSO proxy server, the proxy server redirects the user request to the TiddlyWiki server with this additional request header containing the username. Then TiddlyWiki server is able to use the value of this request header to identify the user.
Header authentication is commonly used for "single sign on" in corporate environments. When doing header authentication, the user is not prompted for a username and password on TiddlyWiki. Instead, the user is required to login at a SSO proxy server. When the user authenticates themselves to the SSO proxy server, the proxy server redirects the user request to the TiddlyWiki server with this additional request header containing the username. Then TiddlyWiki server is able to use the value of this request header to identify the user.

View File

@ -0,0 +1,25 @@
caption: use-browse-cache
created: 20240413042652008
modified: 20240413050841387
tags: [[WebServer Parameters]]
title: WebServer Parameter: use-browser-cache
type: text/vnd.tiddlywiki
The [[web server configuration parameter|WebServer Parameters]] ''use-browser-cache=yes'' activates 200 OK browser caching via the `Cache-Control` header and a smart a Etag header:
* The server javascript creates an MD5 `hash` object.
* Adds the data of the current `request:response` (for example: json text or an image binary) to the hash object.
* Adds the current `headers` of the response to the hash object.
* If the response data has an `encoding` value, adds the encoding to the hash object.
* Calculates the final MD5 hash string as a `contentDigest` javascript variable, and saves it as an `Etag: "<<contentDigest>>"` header.
If the incoming request contains a header named `if-none-match`, then the server will check the generated Etag against all values.
If any `if-none-match` value DOES match the current Etag, the server will send a `304 NOT MODIFIED` response with the current response headers, instead of the data with a `200 OK` response.
This saves bandwidth, as the client can be sure they have already received the exact data and has it in their current cache.
If ''use-browser-cache=no'' (or any other value including null), then the server will return a `Cache-Control: no-store` header by default.
If any customer server route module defines custom `Cache-Control` header behavior, then the server will pass that header through instead of the default.

View File

@ -1,5 +1,5 @@
created: 20180626150526207
modified: 20181216181934282
modified: 20240413043741157
tags: ListenCommand ServerCommand Features
title: WebServer
type: text/vnd.tiddlywiki

View File

@ -25,6 +25,38 @@ Any content of the `<$image>` widget is ignored.
The width and the height can be specified as pixel values (eg "23" or "23px") or percentages (eg "23%"). They are both optional; if not provided the browser will use CSS rules to size the image.
! Responsive images and `<map>`
[[Image maps area|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area]] coordinates are numbers of CSS pixels, therefore they do not scale. If you want to use responsive images, you can use a `svg` and `foreignObject`:
<svg viewBox="0 0 330 333" xmlns="http://www.w3.org/2000/svg" width="50%">
<foreignObject width="100%" height="100%">
[img[Tiddler Fishes.svg]]
</foreignObject>
<g transform="translate(-216 -290)" >
<a href="#:[[Orange fish]]">
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.3-.5.6-1 .9-1.5-.2.3-.4.6-.6.9l.5-1.1c.2 0 .4 0 .6-.1-.2 0-.4.1-.6.1l0-.1c-.3.1-.6.1-.9.2-1.3 0-2.6.1-3.9-.1-11.9-1.3-19-11.9-22-22-.3-1.1-.6-2.2-.8-3.3l-.6-3 .3-1.2c.3-1.2.6-2.4.7-3.6.5-3.4.6-6.7.2-9.8-.7-6.6-3.1-12.8-6.7-18.5-.2-5.8 3.5-15.6 13.2-11.1 0-4.5-4.7-6.8-8.7-6.2 1.1-6-2.8-10.6-9.4-7.3.4-3.7-8.5-7.6-11.8-3.2-2.2-4.3-7.6-8.3-12.2-8.3z"/>
</a>
</g>
</svg>
! Image Status Classes
<<from-version "5.2.2">> The following CSS classes are automatically added to the `<img>` element to indicate the status of the image. Note that only one of these classes will be added at the same time.

View File

@ -1,14 +1,14 @@
created: 20140908130500000
modified: 20150219182745000
modified: 20240326164134356
tags: Concepts Reference
title: Widgets
type: text/vnd.tiddlywiki
~TiddlyWiki's display is driven by an underlying collection of <<.def widgets>>. These are organised into a tree structure: each widget has a parent widget and zero or more child widgets.
~TiddlyWiki generates this <<.def "widget tree">> by parsing the WikiText of tiddlers. Each component of the WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display.
~TiddlyWiki generates this <<.def "widget tree">> by parsing the ~WikiText of tiddlers. Each component of the ~WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display.
Widgets are analogous to elements in an HTML document. Indeed, HTML tags in WikiText generate dedicated <<.def "element widgets">>.
Widgets are analogous to elements in an HTML document. Indeed, HTML tags in ~WikiText generate dedicated <<.def "element widgets">>.
Each class of widget contributes a specific ability to the overall functionality, such as the ability to <<.wlink2 "display an image" ImageWidget>> or <<.wlink2 "a button" ButtonWidget>>, to <<.wlink2 "call a macro" MacroCallWidget>> or <<.wlink2 "transclude text from elsewhere" TranscludeWidget>>, or to [[mark a piece of text as a heading|HTML in WikiText]].
@ -16,4 +16,4 @@ The more specialised widgets use a general-purpose [[widget syntax|Widgets in Wi
The following classes of widget are built into the core:
<<list-links "[tag[Widgets]]">>
<<list-links "[tag[Widgets]]" class:"multi-columns">>

View File

@ -561,3 +561,9 @@ Wang Ke, @Gk0Wk, 2023/10/17
John Long, @drevarr, 2023/12/12
Ed Holsinger, @eschlon, 2024/02/08
Kim I. McKinley, @PotOfCoffee2Go, 2024/03/16
@Jinix6, 2024/03/31
Anders Jarmund, @andjar, 2024/04/05