Merge branch 'tiddlywiki-com'

This commit is contained in:
Jeremy Ruston
2025-11-10 10:22:16 +00:00
8 changed files with 116 additions and 45 deletions

View File

@@ -0,0 +1,19 @@
title: Developer Experience Team
tags: Community/Team
modified: 20251109200632671
created: 20251109200632671
leader: @pmario
team: @saqimtiaz
The Developer Experience Team improves the experience of software contributors to the TiddlyWiki project. This includes enhancing documentation, streamlining contribution processes, and providing tools and resources to help developers effectively contribute to TiddlyWiki.
Tools and resources managed by the Developer Experience Team include:
* Advising and assisting contributors, particularly new developers
* Maintenance of developer-focused documentation on the https://tiddlywiki.com/dev/ site, including:
** Development environment setup guides
** Code review processes and best practices
** Contribution guidelines and documentation
* Continuous integration and deployment scripts providing feedback on pull requests
* Devising and implementing labelling systems for issues and pull requests
* Automation scripts to simplify common development tasks

View File

@@ -0,0 +1,13 @@
created: 20251021142729667
modified: 20251021142729667
tags:
title: Concatenating a text reference to create a URL
type: text/vnd.tiddlywiki
!! Concatenating variables and a text reference to create a URL
<$macrocall $name=wikitext-example src="""<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
<a href=`${ [{!!base-url}] }$#$(hash)$`>this tiddler on tiddlywiki.com</a>
</$let>"""/>
See: [[Substituted Attribute Values]]

View File

@@ -0,0 +1,13 @@
created: 20251021142733998
modified: 20251021142733998
tags:
title: Concatenating variables to create a URL
type: text/vnd.tiddlywiki
!! Concatenating strings and variables to create a URL
<$macrocall $name=wikitext-example src="""<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
<a href=`http://tiddlywiki.com/#$(hash)$`>this tiddler on tiddlywiki.com</a>
</$let>"""/>
See: [[Substituted Attribute Values]]

View File

@@ -0,0 +1,13 @@
created: 20251015120940754
modified: 20251101092833913
tags: $:/deprecated [[Core Classes]]
title: Deprecated Core Classes
type: text/vnd.tiddlywiki
<<.warning "It is not recommended to use these classes for styling. Though tiddlywiki might still support them, they may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using them, and update existing code if possible. Be aware that this feature may cease to work at any time.">>
These [[Core Classes]] are considered deprecated. It is not recommend to use them for styling.
* `tc-tagged-*` <<.deprecated-since 5.1.16>> Use [[Custom styles by data-tags]] instead.
* `tc-reveal` <<.deprecated-since 5.3.8>> for styling purposes as it is subject to change.
* `tc-language-(language code)` <<.deprecated-since 5.3.8>> Please use [[:lang()|https://developer.mozilla.org/en-US/docs/Web/CSS/:lang]] instead.

View File

@@ -1,37 +1,60 @@
created: 20230614225302905
modified: 20230614233448662
modified: 20251021140446753
tags: [[Operator Examples]] [[substitute Operator]]
title: substitute Operator (Examples)
type: text/vnd.tiddlywiki
\define time() morning
\define field() modified
!! Substitute operator parameters
The following example uses a ''function definition'' and a ''function call'' with a ''filter expression''
<<wikitext-example-without-html """\function f.text() [[Hi, I'm $1$ and I live in $2$]substitute[Bugs Bunny],[Rabbit Hole Hill]]
<<f.text>>
""">>
---
The following example uses a [[filtered transclusion|Transclusion in WikiText]] with a [[filter expression|Filter Syntax]] creating a link and a text output.
<<wikitext-example-without-html """link: {{{ [[Hi, I'm $1$ and I live in $2$]substitute[Bugs Bunny],[Rabbit Hole Hill]] }}}
text: <$text text={{{ [[Hi, I'm $1$ and I live in $2$]substitute[Bugs Bunny],[Rabbit Hole Hill]] }}}/>
""">>
!! Substitute variables and parameters
The following example uses [[variable definitions|Pragma: \procedure]] "name", "address", a ''filtered transclusion'' assigned to a ''text-widget''. The variables "name" and "address" are used as ''substitute parameters''.
<<wikitext-example-without-html """\procedure name() Bugs Bunny
\procedure address() Rabbit Hole Hill
<$text text={{{ [[Hi, I'm $1$ and I live in $2$]substitute<name>,<address>] }}}/>
""">>
!! Substitute $(variables)$
The following examples use the variables "name" and "address" and directly substitute the with the [[attribute substitution|Substituted Attribute Values]] syntax.
<<wikitext-example-without-html """\procedure name() Bugs Bunny
\procedure address() Rabbit Hole Hill
<$text text=`Hi, I'm $(name)$ and I live in $(address)$`/>
""">>
!! Substitute a filter expression and a variable
The following example uses a procedure, that defines the text with substitution placeholders. `$(field)$` is defined as a variable. `${ ... }$` is filtered <<.olink2 "substitution placeholder" to:"substitute">>.
<<wikitext-example-without-html """\procedure field() modified
\procedure sentence() This tiddler was last $(field)$ on ${[{!!modified}format:date[DDth MMM YYYY]]}$
\define name() Bugs Bunny
\define address() Rabbit Hole Hill
!Substitute <<.op substitute[]>> operator parameters
<<.operator-example 1 "[[Hi, I'm $1$ and I live in $2$]substitute[Bugs Bunny],[Rabbit Hole Hill]]">>
<$text text={{{ [<sentence>substitute[]] }}}/>
!Substitute variables
This example uses the following variables:
---
* name: <$codeblock code=<<name>>/>
* address: <$codeblock code=<<address>>/>
<$text text=`This tiddler was last $(field)$ on ${[{!!modified}format:date[DDth MMM YYYY]]}$`/>
<<.operator-example 2 "[[Hi, I'm $(name)$ and I live in $(address)$]substitute[]]">>
!Substitute variables and operator parameters
This example uses the following variable:
* time: <$codeblock code=<<time>>/>
<<.operator-example 3 "[[Something in the $(time)$ at $2$ about $1$ ]substitute[Maths],[the Library]]">>
!Substitute a filter expression and a variable
This example uses the following variables:
* field: <$codeblock code=<<field>>/>
* sentence: <$codeblock code=<<sentence>>/>
<<.operator-example 4 "[<sentence>substitute[]]">>
""">>

View File

@@ -1,6 +1,6 @@
caption: substitute
created: 20230614223551834
modified: 20230615173049692
modified: 20251021124124967
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles with placeholders for filter expressions, parameter and variables replaced with their corresponding values
op-parameter: the <<.op substitute>> operator optionally accepts a variable number of parameters, see below for details
@@ -18,7 +18,7 @@ The <<.op substitute>> operator replaces any placeholders in the input titles in
# variables
|placeholder syntax|description|h
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter. Unmatched placeholders pass through unchanged. |
|`$n$`|Text substitution of a parameter provided to the operator, where n is the position of the parameter starting with 1 for the first parameter.<br>Unmatched placeholders pass through unchanged. |
|`$(varname)$`|Text substitution of a variable. Undefined variables are replaced with an empty string. |
|`${ filter expression }$`|Text substitution of the first result of evaluating a filter expression. In other words, if the filter returns multiple titles only the first one will be used. |

View File

@@ -6,7 +6,7 @@ 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.
Since <<.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.

View File

@@ -1,6 +1,6 @@
base-url: http://tiddlywiki.com/
created: 20230615050814821
modified: 20230615173033918
modified: 20251021134906488
tags: [[Widget Attributes]] WikiText
title: Substituted Attribute Values
type: text/vnd.tiddlywiki
@@ -24,22 +24,12 @@ The value of the attribute will be the text denoted by the backticks with any of
!! Substituting a variable value into a string
<$macrocall $name=wikitext-example-without-html src='<$text text=`Hello there this is the tiddler "$(currentTiddler)$"`/>'/>
<$macrocall $name=wikitext-example-without-html src="""<$text text=`Hello there this is the tiddler "$(currentTiddler)$"`/>"""/>
!! Substituting a variable value and the result of evaluating a filter expression into a string
<$macrocall $name=wikitext-example-without-html src='<$text text=`This tiddler is titled "$(currentTiddler)$" and was last modified on ${[{!!modified}format:date[DDth MMM YYYY]]}$`/>'/>
<$macrocall $name=wikitext-example-without-html src="""<$text text=`This tiddler is titled "$(currentTiddler)$" and was last modified on ${[{!!modified}format:date[DDth MMM YYYY]]}$`/>"""/>
!! Concatenating strings and variables to create a URL
{{Concatenating variables to create a URL}}
<$macrocall $name=wikitext-example-without-html src='
<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
<a href=`http://tiddlywiki.com/#$(hash)$`>this tiddler on tiddlywiki.com</a>
</$let>'/>
!! Concatenating variables and a text reference to create a URL
<$macrocall $name=wikitext-example-without-html src='
<$let hash={{{ [<currentTiddler>encodeuricomponent[]] }}}>
<a href=`${ [{!!base-url}] }$#$(hash)$`>this tiddler on tiddlywiki.com</a>
</$let>'/>
{{Concatenating a text reference to create a URL}}