Is there a way to set the active tiddler title as the SiteTitle?

Hi everyone

The title of this post should be self-explanatory. I export pages to static, and would like the text in the browser tab to be the same as the tiddler title, but it is always the contents of the SiteTitle. So is there a way to set SiteTitle so that its contents are always the title of the active tiddler?

Hey I figured out one way to do it. Putting the following in $:/SiteTitle, then closing the other tiddlers.

<$list filter="[list[$:/StoryList]]"/>

Using that filter, I’ve put it as “title” in an alternative Static html export.

This is the out-of-the-box Static html export tiddler, but with <title>...</title> bit changed.

Give it a spin:

Static Export with StoryList Title.json (1.4 KB)

1 Like

It should already be like that: See: https://tiddlywiki.com/static/HelloThere.html

For me it looks like that:

The template, that creates the tiddlers looks like this.

My tab, even after deleting $:/SiteTitle to revert it to default, shows the contents of $:/SiteTitle. Probably the difference is that I use single file and you use node.js?

Hi Dave
SImply try {{$:/HistoryList!!current-tiddler}} as text for $:/SiteTitle in the infopanel

Wow, nice Charlie! Thank you!

[edit for posterity’s sake: this solution caused other problems, notably that the CSS did not get applied to the static tiddler using this solution. Also, it would be better just to clone one of the existing tiddlers tagged $:/tags/Exporter and edit it.

But ultimately I chose JanJo’s solution + my alteration, see below]

Hey, i’m your Huckleberry.

1 Like

Thank you, JanJo, this is a much simpler solution. Although rather than adding it to $:/SiteTitle, I added it to $:/core/wiki/title.