mirror of https://github.com/perkeep/perkeep.git
18 lines
1.0 KiB
Plaintext
18 lines
1.0 KiB
Plaintext
|
Camlistore uses Go html templates (http://golang.org/pkg/text/template/) to publish pages.
|
||
|
|
||
|
Resources for publishing, such as go templates, javascript and css files should be placed in server/camlistored/ui/, so they can be served directly when using the dev server or automatically embedded when using camlistored directly.
|
||
|
|
||
|
You can then specify those resources through the configuration file. For example, there already is a go template (gallery.html), javascript file (pics.js) and css file (pics.css) that work together to provide publishing for image galleries. The dev server config (config/dev-server-config.json) already uses them. Here is how one would use them in the server config ($HOME/.config/camlistore/server-config.json):
|
||
|
|
||
|
"publish": {
|
||
|
"/pics/": {
|
||
|
"rootPermanode": "sha1-6cbe9e1c35e854eab028cba43d099d35ceae0de8",
|
||
|
"style": "pics.css",
|
||
|
"js": "pics.js",
|
||
|
"goTemplate": "gallery.html"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
If you want to provide your own (Go) template, see http://camlistore.org/pkg/publish for the data structures and functions available to the template.
|
||
|
|