On 21 August 2016 at 18:32, Erik Paulson <[email protected]> wrote: > On Sun, Aug 21, 2016 at 9:21 AM, Mathieu Lonjaret > <[email protected]> wrote: >> >> 2) the template configuration (gallery.html) is exactly what should >> allow you to achieve what you want. The default (and only existing >> one) is meant for images, because that was our first need. The point >> of making it user-configurable was indeed to encourage contributions >> for other layouts, such as a blog. But since nobody's taken any >> interest in it, I haven't been extra careful in keeping it functional >> while improving of other aspects of the app handler/publisher. So I'm >> not even sure it's still usable as a "plug-in" solution. > > > Is there a way to add or modify templates at runtime without needing to > recompile? gallery.html is only in src, and it's literally embedded in the > publisher binary: > > epaulson:~/development/camlistore/bin $ strings publisher |grep > camliViewIsOwner > > var camliViewIsOwner = {{$header.ViewerIsOwner}};
yeah, everything is embedded in the binary by default. According to the publisher code, I see that one was supposed to have the option to specify the SourceRoot parameter in the publisher high-level config. Then whatever goTemplate you specify should be used at runtime if found at $SourceRoot/app/publisher/$goTemplate. Unfortunately, there's a bug in the low level config generator; it ignores this sourceRoot parameter (but this is an easy fix, I could it soon). So for now, if you really want to do that, you'd have to use a low-level config file for camlistored instead, and specify this SourceRoot for the publisher section. > in the server-config.json, for the "goTemplate" key under publisher, what > directory path is that relative to? I tried dropping a modified gallery.html > in the same bin directory as camlistored and publisher, but I didn't see any > of my changes to the HTML reflected. If the above SourceRoot is not specified, all *.html found in the source directory of the publisher ($GOPATH/src/camlistore.org/app/publisher/) is embedded in the binary. > Thanks! > > -Erik > > -- > You received this message because you are subscribed to the Google Groups > "Camlistore" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Camlistore" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
