Hi Jeremy,
This is a wonderful trick to activate the links to main tiddlywiki.com!
My question is:
Exporting to a *static.html* using official template
($:/core/templates/static.template.html) and "tiddlywiki --build static"
is it possible to activate links by
modifying tv-wikilink-template like \define tv-wikilink-template()
#$uri_encoded$
In other words static.html contains all tiddlers rendered in a single html
file and activating links means clicking a tiddler link will bring it under
focus!
--Mohammad
p.s: the standard static command is the one generated by tiddlywiki mywiki
--init server as below
"static": [
"--rendertiddler",
"$:/core/templates/static.template.html",
"static.html",
"text/plain",
"--rendertiddler",
"$:/core/templates/alltiddlers.template.html",
"alltiddlers.html",
"text/plain",
"--rendertiddlers",
"[!is[system]]",
"$:/core/templates/static.tiddler.html",
"static",
"text/plain",
"--rendertiddler",
"$:/core/templates/static.template.css",
"static/static.css",
"text/plain"
]
On Wednesday, April 24, 2019 at 2:24:02 PM UTC+4:30, Jeremy Ruston wrote:
>
> Hi Tony
>
> The link widget offers several options for generating the href of links —
> see “HREF Generation”:
>
> https://tiddlywiki.com/#LinkWidget
>
> In particular, see the docs for the variable tv-wikilink-template:
>
> https://tiddlywiki.com/#tv-wikilink-template%20Variable
> <https://tiddlywiki.com/#tv-wikilink-template+Variable>
>
> To create a custom static HTML exporter that routes wikilinks back to a
> wiki in a file called index.html:
>
> 1. Locate the shadow tiddler $:/core/templates/exporters/StaticRiver and
> open it
> 2. Clone it to create a new tiddler called
> "$:/core/templates/exporters/StaticRiverWithWikiLinks”
> 3. Set the description field of the clone to "Static HTML with wiki links”
> 4. Modify the first line of the tiddler from "\define
> tv-wikilink-template() #$uri_encoded$” to "\define tv-wikilink-template()
> index.html#$uri_encoded$”
> 5. Save the tiddler
>
> Now, when you click “export” on a tiddler you’ll see the additional export
> option. A link to “HelloThere” will be transformed to a link to
> “index.html#HelloThere”.
>
> Let me know how you get on,
>
> Best wishes
>
> Jeremy
>
>
> On 23 Apr 2019, at 05:45, TonyM <[email protected] <javascript:>> wrote:
>
> Folks,
>
> It *is possible* to export a tiddler as "Static HTML". This allows a
> tiddler to be published separately from the WIki as a whole and can be
> rendered in its own right?
>
> The links within a static tiddler (to other Tiddlers) get changed to be
> "The Static HTML Tiddler#tiddlername" which is more often than not invalid.
>
> I am wondering if anyone has identified how to edit or clone the the
> export Static HTML process/template to instead have the links within Static
> HTML tiddlers to refer to the originating or specified TiddlyWiki. My
> attempts to follow the process on Tiddlywiki.com are throwing error
> messages.
>
> For example If I were at https://tiddlywiki.com/#HTML%20in%20WikiText and
> I exported this tiddler as a Static HTML tiddler, it would create a html
> file called "HTML%20in%20WikiText
> <https://tiddlywiki.com/#HTML%20in%20WikiText>.html" however IF the title
> of this tiddler would link to https://tiddlywiki.com/#HTML%20in%20WikiText
> and
> any "internal wiki links" within the static HTML tiddler would link to
> https://tiddlywiki.com/#
> <https://tiddlywiki.com/#HTML%20in%20WikiText>tiddlername
> this would mean,
>
> If you land on a static HTML page and click any active link you would
> either;
>
> - Go to or open an external link address
> - Or if the link is an internal one, load the full Wiki and navigate
> to the tiddlername.
>
> We can see that tiddlywiki.com has a folder tiddlywiki.com/static and
> every internal link, links to another html page
> tiddlywiki.com/static/tiddlername.html file. In this case all tiddlers
> need to be exported as static html to remain valid.
> I believe this is done via a batch server command.
>
> If this feature to export Static HTML tiddlers, for which internal links
> refer back to the full wiki, it would be possible to export only select
> tiddlers that would be visible in search engines etc.. yet on clicking a
> link will redirect the user to the full interactive wiki. This seems to me
> a Quick and easy way to draw people to content but automatically drive them
> to the full interactive wiki.
>
> If such selectively static HTML published tiddlers are placed in a known
> location such as mydomain.com/static, as tiddlywiki.com does, we could
> create a button that can open such tiddlers Static HTML version in another
> tab without loading the full wiki, and users could bookmark these as
> references, while being able to open the interactive wiki if desired.
>
> Thanks for your Feedback in advance
> Tony
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/01651eae-2b8f-4e74-b2c5-b76e19fcdc1e%40googlegroups.com
>
> <https://groups.google.com/d/msgid/tiddlywiki/01651eae-2b8f-4e74-b2c5-b76e19fcdc1e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/8e129e32-9d69-47e4-9640-8d07d206bdf7%40googlegroups.com.