From c2b436371bd235eb77fd038e0955d405e02218c4 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 12:08:00 +0100 Subject: [PATCH] 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 --- editions/tw5.com/tiddlers/system/Sources.tid | 38 ++++++++++++-------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/Sources.tid b/editions/tw5.com/tiddlers/system/Sources.tid index c251f7a4f..d28d9fc05 100644 --- a/editions/tw5.com/tiddlers/system/Sources.tid +++ b/editions/tw5.com/tiddlers/system/Sources.tid @@ -1,26 +1,36 @@ title: $:/editions/tw5.com/TiddlerInfo/Sources tags: $:/tags/TiddlerInfo caption: Sources +code-body: yes -\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="[encodeuricomponent[]encodeuricomponent[]]" select="0"> -> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<>/> + > + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" + > + <$text text=<>/> + \end -\define github-link-base() -https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$ -\end - -\define make-github-link() -<$set name="title" value={{$:/config/OriginalTiddlerPaths##$(currentTiddler)$}}> -<$set name="title" filter="[encodeuricomponent[]]" select="0"> -<a href=<<github-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<github-link-base>>/></a> -</$set> +\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" + >Direct link to <$text text=<<currentTiddler>>/> on github.com</a> + </$set> </$set> \end @@ -30,7 +40,7 @@ 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 by suggesting changes to this tiddler using the [[TiddlyWiki Docs PR Maker|https://saqimtiaz.github.io/tw5-docs-pr-maker/]] * <<make-github-link>>