Static site question: possible to replace <title>Wiki title</title> with individual title of each tiddler?

55 views
Skip to first unread message

Suzanne McHale

unread,
Jun 15, 2015, 4:07:54 AM6/15/15
to tiddl...@googlegroups.com
I am wondering if there is an expression to use in the $:/core/templates/static.tiddler.html that would enable each Node.js generated tiddler to have its individual title in the <title> tag (in the HTML page <head> section), rather than the main Tiddlywiki title that is currently used? (i.e.: <title>`{{$:/core/wiki/title}}`</title>) I have found a regular expression to do this in Notepad++ after the static site pages are generated (see below), but it would be much more convenient for it to be done automatically. (Hope that all makes sense!)


---
Find: <title>([^<]+)(</title>[\S\s]+?<h2 class="tc-title">)([^<]+)
Replace: <title>$3$2$3

Jeremy Ruston

unread,
Jun 15, 2015, 4:56:35 AM6/15/15
to TiddlyWiki
Hi Suzanne

> I am wondering if there is an expression to use in the $:/core/templates/static.tiddler.html that would enable each Node.js generated tiddler to have its individual title in the <title> tag (in the HTML page <head> section), rather than the main Tiddlywiki title that is currently used? (i.e.: <title>`{{$:/core/wiki/title}}`</title>) I have found a regular expression to do this in Notepad++ after the static site pages are generated (see below), but it would be much more convenient for it to be done automatically. (Hope that all makes sense!)

I think that the current behaviour is pretty much a bug. I've added the tiddler title or caption to the template for 5.1.9:


You can copy the revised template into 5.1.8, but you should give it a different name, and adjust the title used in the rendertiddlers command accordingly.

Best wishes

Jeremy.



--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f8de8d93-8a53-4e50-a0ee-42ebed376364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com
Reply all
Reply to author
Forward
0 new messages