Update tw5.com Tiddler Info/Sources to use links

Prompted by @sukima
print-window-tiddler
Jermolene 2016-10-19 22:06:15 +01:00
rodzic a292a2be44
commit 6dc90718f0
1 zmienionych plików z 23 dodań i 14 usunięć

Wyświetl plik

@ -2,27 +2,36 @@ title: $:/editions/tw5.com/TiddlerInfo/Sources
tags: $:/tags/TiddlerInfo tags: $:/tags/TiddlerInfo
caption: Sources caption: Sources
\define makeStaticLink() \define static-link-base()
http://tiddlywiki.com/static/<$view tiddler=<<currentTiddler>> field="title" format="doubleurlencoded"/>.html http://tiddlywiki.com/static/$(title)$.html
\end \end
\define outerMakeStaticLink()
<$macrocall $name="makeStaticLink" $output="text/plain"/> \define make-static-link()
\end <$set name="title" filter="[<currentTiddler>encodeuricomponent[]encodeuricomponent[]]" select="0">
\define makeGitHubLink() <a href=<<static-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<static-link-base>>/></a>
https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/$(githubLink)$
\end
\define outerMakeGitHubLink()
<$set name="githubLink" value={{$:/config/OriginalTiddlerPaths##$(currentTiddler)$}}>
<a href=<<makeGitHubLink>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<makeGitHubLink>>/></a>
</$set> </$set>
\end \end
\define github-link-base()
https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/$(title)$
\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>
\end
<$list filter="[all[current]!is[system]!is[shadow]]"> <$list filter="[all[current]!is[system]!is[shadow]]">
A static HTML representation of this tiddler is available at the URL: A static HTML representation of this tiddler is available at the URL:
* <<outerMakeStaticLink>> * <<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 sending a ~GitHub pull request for this tiddler:
* <<outerMakeGitHubLink>> * <<make-github-link>>
</$list>
</$list>