Hi Tony

The link widget offers several options for generating the href of links — see 
“HREF Generation”:

https://tiddlywiki.com/#LinkWidget <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]> 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 
> <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 
> <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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <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 
> <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 post to this group, send email to [email protected].
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/176BF7D8-AF20-44C7-A4CF-94E4D3135B33%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to