Thanks for the reply. I was beginning to wonder if I was just being so 
stupid it wasn't worth responding to. :)

I will give your suggestion a try, hopefully it works and brings to a close 
over a week of trying to figure it out, including installing third-party 
node profiling tools to get more insight into what is going on under the 
covers.

Ultimately, the use case I am trying to get to with TW5 in this instance is 
to replace using something like Pelican for generating my static web site 
and just use TW instead. Getting the site title and subtitle into the 
sidebar were the first step. TOC will be the second step. The final step 
will be figuring out how to get the "tag buttons" for tiddlers to be 
anchors with appropriately transformed URLs on a static page (right now the 
buttons show up and onhover causes the pointer to change to indicate 
they're clickable, but obviously clicking on them does nothing). I have 
been looking into that. I presume figuring out a way to replace button 
widgets with link widgets in the static template is my main hope. But 
before I dirty this thread more, I will give it a go and if I have specific 
questions around that will post a different thread.

I also have a small "bug" in a TW documentation tiddler I plan on filing a 
pull request once I get a bit of time. It is related to a bug I filed a few 
months back.

Anyway, if I can get those three pieces in place, then I think using TW to 
be a static site generation tool will be easy, and I plan on documenting 
and publishing how as I go. Thanks again.

On Wednesday, December 3, 2014 11:32:24 AM UTC-6, Jeremy Ruston wrote:
>
> Hi Jim
>
> My apologies for the late reply. Getting the TOC working for static sites 
> is an excellent idea.
>
> I think that the problem is that the core global macros are explicitly 
> imported into $:/core/templates/static.tiddler.html via the 
> <$importvariables> widget. This means that those macros are only available 
> within the content area of the <$importvariables> widget.
>
> You can move the <$importvariables> widget so that it wraps the entire 
> template to resolve this problem.
>
> Best wishes
>
> Jeremy.
>
> On Sat, Nov 29, 2014 at 6:45 PM, Jim Lehmer <[email protected] 
> <javascript:>> wrote:
>
>> I feel like I am real close on this, but keep hitting barriers. I have a 
>> working TOC using the *toc *macro. I have changed the 
>> *$:/core/templates/static.tiddler.html 
>> *to successfully show the *SiteTitle *and *SiteSubtitle *just like on 
>> the "normal" (Javascript-enabled) wiki:
>>
>> <body class="tc-body">
>> `{{$:/StaticBanner||$:/core/templates/html-tiddler}}
>> `<div class="tc-sidebar-scrollable" style="overflow: auto;">
>> <div class="tc-sidebar-header">
>> `<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes" 
>> retain="yes">
>>     
>> `<h1 class="tc-site-title">`<$transclude tiddler="$:/SiteTitle" 
>> mode="inline"/>`</h1>
>> <div class="tc-site-subtitle">`<$transclude tiddler="$:/SiteSubtitle" 
>> mode="inline"/>`</div>
>>
>> This works fine. Under those I don't want all the buttons and tabs in the 
>> static sidebar (since they wouldn't work anyway), but just a TOC. When I 
>> add the following right after the above, it shows the dynamically generated 
>> TOC successfully in the *$:/core/templates/static.tiddler.html *once I 
>> leave edit mode:
>>
>> <div class="tc-table-of-contents">
>> `{{Table of Contents}}`
>> </div>
>>
>> But when I render out the static site, the *<div 
>> class="tc-table-of-contents"> *and closing *</div> *are inserted into 
>> the static HTML, along with some blank lines between them (for presumably 
>> each TOC list entry). I have tried both transcluding the existing *Table 
>> of Contents* tiddler as well as calling the *toc *macro directly within 
>> the above *div*, just like in the *Table of Contents *tiddler itself, 
>> but in both cases I get the same results. What am I missing?
>>
>> BTW, I have been working on getting a usable sidebar for a static site 
>> for days now - it is a lot of work for what I would think is something many 
>> would want. I am trying to document what I am doing so I can write some 
>> articles about it, but if someone has already done the heavy lifting, I 
>> would appreciate pointers. I've searched this group and the web, but not 
>> with much success.
>>
>> Thanks,
>>
>> Jim
>>
>> -- 
>> 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 http://groups.google.com/group/tiddlywiki.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to